Oracle/Oracle

Advertisement


Question
Sir I want to retrieve all  records between two dates . that is all records between this two dates 16-07-2009 to 16-08-2009 . Please give me more examples on this query

Answer
Hi there

Some examples:

select * from dual a
where sysdate between to_date('16/07/2009','dd/mm/yyyy') and to_date('16/08/2009','dd/mm/yyyy')

select * from dual a
where sysdate between to_date(replace('16-07-2009','-','/'),'dd/mm/yyyy') and to_date(replace('16-07-2009','-','/'),'dd/mm/yyyy')

Oracle

All Answers


Answers by Expert:


Ask Experts

Volunteer


Edson

Expertise

I can answer questions about Sql (including Sql tuning), pl/Sql and a bit of oracle administration

Experience

I work as a consultant in Brazil and I face problems of all kind in oracle every day development.

Education/Credentials
INFNET, Oracle Database SQL expert

©2012 About.com, a part of The New York Times Company. All rights reserved.