Home » Other » General » how to get last months records on using any oracle functions
how to get last months records on using any oracle functions [message #102578] Wed, 24 July 2002 07:57 Go to next message
avani
Messages: 3
Registered: July 2002
Junior Member
can you please tell me if there is a simple way to get only last months data on running a query against a table which has a date field.
Re: how to get last months records on using any oracle functions [message #102579 is a reply to message #102578] Wed, 24 July 2002 12:58 Go to previous message
inna
Messages: 6
Registered: July 2002
Junior Member
to get only last months data on running a query against a table table1 which has a date field column1

try

select * from table1
where trunc(column1,'MONTH')=
TRUNC(ADD_MONTHS(SYSDATE,-1),'MONTH')
Previous Topic: Question
Next Topic: unlock rows in oracle table
Goto Forum:
  


Current Time: Sun Dec 04 18:37:02 CST 2022