From: | Dave_Pfaltzgraff(at)patapsco(dot)com |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Questions on 'datetime' parameters |
Date: | 2001-01-29 15:25:15 |
Message-ID: | 852569E3.0054B5F2.00@patapsco.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Dave Pfaltzgraff(at)PATAPSCO
01/29/2001 10:25 AM
I have a table defined as:
Table = associate
+---------------------+----------------------------------+-------+
| Field | Type | Length|
+---------------------+----------------------------------+-------+
| as_id | int4 not null | 4 |
| as_card | char() | 10 |
| as_end | datetime default ( now ( ) + 31 )| 8 |
+---------------------+----------------------------------+-------+
and would like to select entries where as_end is prior to the current
time. Which of the following would be the correct SQL statement?
SELECT AS_Card, AS_ID INTO ntemp FROM Associate WHERE AS_End < time('now');
or:
SELECT AS_Card, AS_ID INTO ntemp FROM Associate WHERE AS_End < 'now';
or, is there another form better... like maybe 'now'::datetime ...?
Thanks,
Dave
From | Date | Subject | |
---|---|---|---|
Next Message | ender | 2001-01-29 18:45:47 | binary data |
Previous Message | John Burski | 2001-01-29 15:15:25 | Re: Still lockin up... |