Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 3849 | Replies: 2
![]() |
•
•
Join Date: Mar 2007
Location: Islamabad, Pakistan
Posts: 19
Reputation:
Rep Power: 2
Solved Threads: 1
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.
If you question is how to formulate a query in general, then please find an SQL forum.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Jul 2006
Location: Dublin,California
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
If you have a query to fire , then use the SYSDATE as the standard one.
For example, on Oracle if I query as follows,
"select SYSDATE from DUAL", it should get me today's date. You may need to use this as part of your query. I understand you are in the midst of a Java program
So, after your query is built at Java area, you need to use the word "SYSDATE" which Oracle understands. I think it can work on other Databases too. But you may check it once.
Hope this helped.
For example, on Oracle if I query as follows,
"select SYSDATE from DUAL", it should get me today's date. You may need to use this as part of your query. I understand you are in the midst of a Java program
So, after your query is built at Java area, you need to use the word "SYSDATE" which Oracle understands. I think it can work on other Databases too. But you may check it once.
Hope this helped.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode