ORA-00936 Missing Expression , with Select Statement
398398Oct 11 2005 — edited Mar 21 2007Hi All
Using a Java Program I am trying to access a Oracle 9i(Release 2 ) database, and I am using following expression in my java program, and when run it gives ORA-00936 error message:
String query2 ="SELECT * FROM History_Table Where WAFCO ='Company1' and WDATE = date";
WDATE is VARCHAR2(8)
and date is a String type of variable capturing from java program as below:
String date = JOptionPane.showInputDialog(null,"Please Enter the Date","XML File",JOptionPane.QUESTION_MESSAGE);
----
Nothing wrong with the query and connections, for date if I give manual value as '20051011', it works fine...
Can someone provide insight please??
Thanks in advance