Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to Select last 30 days

Re: How to Select last 30 days

From: GHouck <hksys_at_teleport.com>
Date: Mon, 05 Oct 1998 22:10:37 GMT
Message-ID: <361943DC.413D@teleport.com>


Chakravarthy KM Nalamotu wrote:
>
> Hello Oracle Users,
> Is there a way to write a SQL SELECT statement and return the last 30 days
> dates starting from SYSDATE?
> I could not think of a way to do it.
> Your response is greatly appreciated.
> Thanx,
> Kittu.

If you mean the records within the last 30 days, this might work:

select mydate from mytable where mydate >= (sysdate-30) order by mydate desc

Yours,

Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys Received on Mon Oct 05 1998 - 17:10:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US