RE: [SQL] timespan arithmetic - Mailing list pgsql-sql

From David Rose
Subject RE: [SQL] timespan arithmetic
Date
Msg-id 199907270551.WAA24650@not.rd.wdi.disney.com
Whole thread Raw
In response to RE: [SQL] timespan arithmetic  ("Jackson, DeJuan" <djackson@cpsgroup.com>)
List pgsql-sql
Jackson, DeJuan writes:
> I'm not certain this will work, but
> try:
>     SELECT * FROM table 
>       WHERE loaded_time::datetime >= now()::datetime - '1
> days'::timespan
>       ORDER BY loaded_time DESC;

Excellent!  That did the trick.  Many thanks!

(I feel a little stupid for not thinking of trying 'datetime' by
myself--I was running into a dead end with 'reltime'.  Oh well.
Thanks!)

David



pgsql-sql by date:

Previous
From: "Dan Wilson"
Date:
Subject: Re: [GENERAL] escaping wildcard chars
Next
From: wieck@debis.com (Jan Wieck)
Date:
Subject: Re: [SQL] Good Optimization