Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de [53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id KAA23209 for ; Thu, 9 Dec 1999 10:26:28 -0500 (EST) (envelope-from wieck@debis.com) Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-sql@postgreSQL.org id m11w5Kz-0003kGC; Thu, 9 Dec 99 16:18 MET Message-Id: From: wieck@debis.com (Jan Wieck) Subject: Re: [SQL] timestamp/now in views To: gmerrall@email.com (Graeme Merrall) Date: Thu, 9 Dec 1999 16:18:33 +0100 (MET) Cc: pgsql-sql@postgreSQL.org Reply-To: wieck@debis.com (Jan Wieck) In-Reply-To: from "Graeme Merrall" at Dec 9, 99 10:18:47 am X-Mailer: ELM [version 2.4 PL25] Content-Type: text > > 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@debis.com (Jan Wieck) #