From: | wieck(at)debis(dot)com (Jan Wieck) |
---|---|
To: | gmerrall(at)email(dot)com (Graeme Merrall) |
Cc: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | Re: [SQL] timestamp/now in views |
Date: | 1999-12-09 15:18:33 |
Message-ID: | m11w5Kz-0003kGC@orion.SAPserv.Hamburg.dsh.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
>
> Sorry for being an idiot but I saw something similar to this in the docs but
> haven't been able to find it since.
> I tried creating a view using the following syntax
> CREATE VIEW prev_day AS SELECT * FROM audit WHERE audit_datetime >
> (current_timestamp - interval'24 hours');
... WHERE audit_datetime >
timestamp('now'::text) + '@24hours'::interval
That one should work.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck(at)debis(dot)com (Jan Wieck) #
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 1999-12-09 15:27:39 | Re: [SQL] subquery, except and view |
Previous Message | tjk@tksoft.com | 1999-12-09 08:57:00 | Re: [SQL] select a part of a name |