Re: [GENERAL] Programmatic access to interval units

2014-12-02 Thread Nelson Green
On Tue, Dec 2, 2014 at 3:48 PM, Merlin Moncure wrote: > On Tue, Dec 2, 2014 at 12:40 PM, Nelson Green > wrote: > > In the line: IF LOWER(_unit) NOT IN (SELECT interval_unit ..., I would > > rather > > query a catalog table for the interval unit names if possible. That would > > then > > compensa

Re: [GENERAL] Programmatic access to interval units

2014-12-02 Thread Merlin Moncure
On Tue, Dec 2, 2014 at 12:40 PM, Nelson Green wrote: > In the line: IF LOWER(_unit) NOT IN (SELECT interval_unit ..., I would > rather > query a catalog table for the interval unit names if possible. That would > then > compensate for any changes to those values in the future. > > When I meant do

Re: [GENERAL] Programmatic access to interval units

2014-12-02 Thread Adrian Klaver
On 12/02/2014 10:40 AM, Nelson Green wrote: On Tue, Dec 2, 2014 at 11:57 AM, Merlin Moncure mailto:mmonc...@gmail.com>> wrote: Hi Merlin, I'm afraid I'm only confusing things, so let me give an example of what I am trying to do: -- Example ---

Re: [GENERAL] Programmatic access to interval units

2014-12-02 Thread Nelson Green
On Tue, Dec 2, 2014 at 11:57 AM, Merlin Moncure wrote: > On Tue, Dec 2, 2014 at 9:48 AM, Nelson Green > wrote: > > On Mon, Dec 1, 2014 at 2:14 PM, Merlin Moncure > wrote: > >> On Mon, Dec 1, 2014 at 10:42 AM, Nelson Green > >> wrote: > >> > Good morning list, > >> > > >> > According to the doc

Re: [GENERAL] Programmatic access to interval units

2014-12-02 Thread Nelson Green
On Tue, Dec 2, 2014 at 10:16 AM, Melvin Davidson wrote: > > > > > > > > > > > > > > > > > > > > > > *I'm pretty sure the interval values are buried in the code, but there is > nothing to prevent you from creating your own reference table. :) CREATE > TABLE time_intervals( time_interval_name var

Re: [GENERAL] Programmatic access to interval units

2014-12-02 Thread Merlin Moncure
On Tue, Dec 2, 2014 at 9:48 AM, Nelson Green wrote: > On Mon, Dec 1, 2014 at 2:14 PM, Merlin Moncure wrote: >> On Mon, Dec 1, 2014 at 10:42 AM, Nelson Green >> wrote: >> > Good morning list, >> > >> > According to the documentation for interval data type inputs, the unit >> > can >> > be one of

Re: [GENERAL] Programmatic access to interval units

2014-12-02 Thread Melvin Davidson
*I'm pretty sure the interval values are buried in the code, but there is nothing to prevent you from creating your own reference table. :) CREATE TABLE time_intervals( time_interval_name varchar(15) NOT NULL, CONSTRAINT time_intervals_pk PRIMARY KEY (time_interval_name));INSERT INTO time_interva

Re: [GENERAL] Programmatic access to interval units

2014-12-02 Thread Nelson Green
On Mon, Dec 1, 2014 at 2:14 PM, Merlin Moncure wrote: > On Mon, Dec 1, 2014 at 10:42 AM, Nelson Green > wrote: > > Good morning list, > > > > According to the documentation for interval data type inputs, the unit > can > > be one of microsecond, millisecond, second, minute, hour, day, week, > mo

Re: [GENERAL] Programmatic access to interval units

2014-12-01 Thread Merlin Moncure
On Mon, Dec 1, 2014 at 10:42 AM, Nelson Green wrote: > Good morning list, > > According to the documentation for interval data type inputs, the unit can > be one of microsecond, millisecond, second, minute, hour, day, week, month, > year, decade, century, or millennium. Are these units stored in a