This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I have a TABLE called rpdnotification. Within rpdnotification is an INTEGER Field entitled rundate. rundate is the last date that the notification is supposed to run. In the TABLE rpdbullein is an INTEGER Field entitled notedate. notedate is the current entry day of the bulletin. Both dates are converted to and stored as Integers in the following format yyyymmdd.
I can't see anything obviously wrong with your code.
Does your query return any rows when you run "select * from rpdnotification where rundate >= 20040826" directly against the DB (i.e. not with Java)? Try sticking some debug logging in there to see what's happening along the way. You're not doing anything daft like catching Exceptions and ignoring them are you?
A couple of tips: it's considered best practice (safer, more secure, etc.) to use PreparedStatement instead of just plain old Statement. Are you aware that you're not using the DBResultSet?
When you post code please surround it with the UBB [C0DE] and [/C0DE] tags to preserve your formatting. Thanks.
Joined: Aug 30, 2004
Thank you very much for the reply. I solved the problem today by adjusting my sql statement to
SELECT * FROM rpdnotification WHERE rundate >= (SELECT MAX(notedate) FROM rpdbulletin)