This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes sql querry for date. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "sql querry for date." Watch "sql querry for date." New topic

sql querry for date.

sachin komurlekar

Joined: May 09, 2001
Posts: 14
i want to get the names of all workers from a table who have joined after a particular date(eg after 1997).
the table is having the name of workers who have joined from 1985 till 2000.
please give me sqlcoding that can be used in jdbc.
i am using MSaccess as back end.
Smita Tyagi

Joined: May 09, 2001
Posts: 21
Hello Sachin,
You can use a prepared statement like this:
PreparedStatement stat = myConn.prepareStatement("Select name from table where (joining_date between ? and ?)");
you try this and let me know whether it works.
I agree. Here's the link:
subject: sql querry for date.
It's not a secret anymore!