aspose file tools*
The moose likes JDBC and the fly likes Need help in writing a SQL query regarding  Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Need help in writing a SQL query regarding  Date" Watch "Need help in writing a SQL query regarding  Date" New topic
Author

Need help in writing a SQL query regarding Date

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi

There is a column called as IN_TIME in our table . Till now i am firing queries based on the exact date as



Now my query is , is it possible to fire a query as i want to get all the data before 22 - MAR-10

My question is how to get all the values before 22-MAR-10

Thanks


Save India From Corruption - Anna Hazare.
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
You can use the sql query as follows..


SELECT *
FROM TABLE_NAME
WHERE IN_TIME <= '22-MAR-10';

this shall fetch all the values less than the mentioned date
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help in writing a SQL query regarding Date