pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas F.O'Connell <tfo@sitening.com>
To: Chandan_Kumaraiah <Chandan_Kumaraiah@satyam.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: query
Date: Mon, 21 Mar 2005 08:33:43 -0600
Message-ID: <d2ac5d5caa72f051e6360166c9fbe40a@sitening.com> (raw)
In-Reply-To: <2EB549AAAFEA264FA926269A5BD5E9EB146577@certsrv.satyam.com>
References: <2EB549AAAFEA264FA926269A5BD5E9EB146577@certsrv.satyam.com>

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




view thread (15+ messages)  latest in thread

Message-ID: <d2ac5d5caa72f051e6360166c9fbe40a@sitening.com>
Permalink:  ../d2ac5d5caa72f051e6360166c9fbe40a@sitening.com/
Also on:    postgresql.org/message-id/d2ac5d5caa72f051e6360166c9fbe40a@sitening.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tfo@sitening.com, Chandan_Kumaraiah@satyam.com
  Subject: Re: query
  In-Reply-To: <d2ac5d5caa72f051e6360166c9fbe40a@sitening.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox