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!

ORA-00936 Missing Expression , with Select Statement

398398Oct 11 2005 — edited Mar 21 2007
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 18 2007
Added on Oct 11 2005
7 comments
1,081 views