This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm trying to run a select query from a java class. The query is built as a simple string based on user's input. However, I get ORA-01843: not a valid month error when I have date values inside where clause.. When I copy the same query and execute in Oracle DB viewer it works perfectly.. What could be the problem?
the problem is that you did not post any code (yet).
Also: do your java class and the Oracle DB viewer use the same driver?
Joined: Apr 27, 2007
This is the query: String query="select PRCS_DT from PURCH_TRANS where PRCS_DT='4/5/2007'" ; rs = stmt.executeQuery(query); It works fine when copied and executed in DB viewer.. I'm also sure that both java and Oracle use the same driver.. Please help..