Use PreparedStatement and new Date (using java.sql.Date not java.util.Date).
If you question is how to formulate a query in general, then please find an SQL forum.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
Another way with sysdate is:
select * from table where StartDate = sysdate
or better the following will check only the date without taking into account the hours, minutes:
select * from table where trunc(StartDate) = trunc(sysdate)
With the first, these dates will be unequal:27/07/2009 12:00:00 , 27/07/2009 12:00:01
but with the second query only the year, month, day will be compared
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448