Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with date format in select query

585612Nov 8 2007 — edited Nov 9 2007
Hi
I am caught by a stupid problem, please help me
I am writing a queries
SELECT * FROM VOUCHERS WHERE VDATE = '07-AUG-08'
SELECT * FROM VOUCHERS WHERE VDATE = '07-AUG-2008'.
both are working fine in SQL Developer but returning error when called from JDBC Driver.
First query doesn't return any record while it is supposed to
Second returns error: ORA-01858: a non-numeric character was found where a numeric was expected
What i remember, at least second query was working previously but what happend, i dont know
i didn't change Oracle default datetime format or any other defaults

Message was edited by:
W-S
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2007
Added on Nov 8 2007
6 comments
1,144 views