AllExperts > Oracle 
Search      
Oracle
Volunteer
Answers to thousands of questions
 Home · More Oracle Questions · Answer Library  · Encyclopedia ·
More Oracle Answers
Question Library

Ask a question about Oracle
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About 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

 
   

You are here:  Experts > Computing/Technology > Oracle > Oracle > Oracle

Oracle - Oracle


Expert: Edson - 8/16/2009

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')

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.