Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.4) with SMTP id f7EGYjP76786 for ; Tue, 14 Aug 2001 12:34:45 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7AJWcP62797 for ; Fri, 10 Aug 2001 15:32:38 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f7AJBnu62325 for pgsql-sql@postgresql.org; Fri, 10 Aug 2001 15:11:49 -0400 (EDT) (envelope-from news) From: "Carl Karsten" References: <9l19vh$9ku$1@cronkite.temple.edu> Subject: Re: the day before yesterday. Date: Fri, 10 Aug 2001 14:12:24 -0500 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Message-ID: X-Newsgroups: comp.databases.postgresql.sql, microsoft.public.fox.vfp.queries-sql To: pgsql-sql@postgresql.org X-Archive-Number: 200108/195 X-Sequence-Number: 4420 I am not sure if this will work with Oracle. I would like to know, so if you could try out this test : http://www.foxforum.com/showfullmessage.cfm?messageID=12382 If it does work, then you should be able to do this: ldDby = date()-2 lnRet = sqlexec( h, "select * from Table where InputDate>=?ldDby" ) Carl Karsten "Jason" wrote in message news:9l19vh$9ku$1@cronkite.temple.edu... > I am trying to retrieve records generated in the passed two days and > encountered difficulties in dealing with the date in Oracle. > Here is the query I try to form: > > select * from Table where InputDate>=[the day before yesterday] > > I tried "sysdate-2", didn't work. > Any suggestions? > Thanks! > > Jason > > >