Received: from fep7.mail.ozemail.net (fep7-old.mail.ozemail.net [203.2.192.99]) by hub.org (8.9.3/8.9.3) with ESMTP id SAA05316 for ; Wed, 8 Dec 1999 18:20:44 -0500 (EST) (envelope-from gmerrall@email.com) Received: from default (slpen53p47.ozemail.com.au [203.108.42.239]) by fep7.mail.ozemail.net (8.9.0/8.6.12) with SMTP id KAA12972 for ; Thu, 9 Dec 1999 10:20:34 +1100 (EST) From: "Graeme Merrall" To: Subject: timestamp/now in views Date: Thu, 9 Dec 1999 10:18:47 +1100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Importance: Normal 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'); Now as some of you will pick up, this creates a view with the current timestamp set to the creation time of the view, not the actual time the view was executed. I hacked around with various combos of quote marks and tried now() and so on, but to no avail. Can someone enlighten me? Cheers, Graeme