Re: query

From: Thomas F(dot)O'Connell <tfo(at)sitening(dot)com>
To: "Chandan_Kumaraiah" <Chandan_Kumaraiah(at)satyam(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: query
Date: 2005-03-21 14:33:43
Message-ID: d2ac5d5caa72f051e6360166c9fbe40a@sitening.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

You should be able to use the CURRENT_DATE function in place of sysdate.

You might need to cast the 1 explicitly to an interval.

As in:

CURRENT_DATE - '1 day'::interval

-tfo

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Mar 17, 2005, at 4:57 AM, Chandan_Kumaraiah wrote:

> Hi, 
>
> In oracle we write sysdate-1
>
> For example,we write a query (select * from table1 where
> created_date>=sysdate-1).Whats its equivalent in postgre?
>
> Chandan

In response to

  • query at 2005-03-17 10:57:34 from Chandan_Kumaraiah

Responses

  • Re: query at 2005-03-21 15:17:35 from Bruno Wolff III

Browse pgsql-sql by date

  From Date Subject
Next Message Martín Marqués 2005-03-21 14:40:15 Re: CASE not working
Previous Message Alvaro Herrera 2005-03-21 14:29:31 Re: CASE not working