Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to Select last 30 days
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