Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

bind variable does not exist

 
Steve Jiang
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I met the following error in jdbc

java.sql.SQLException: ORA-01006: bind variable does not exist

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)

The query can be excuated in SQL-plus without problem.



SELECT A.ID, B.ID FROM (SELECT S.ID, S.NAME FROM S WHERE S.F_ID = ? ) A, (SELECT S.ID, S.NAME FROM S WHERE S.F_ID = ? ) B WHERE A.NAME = B.NAME (+)

any comments?

Thanks
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35969
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve,
What does the plus sign mean at the end of the query?
 
Steve Jiang
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
right out join. to set 0 for id when there is no corresponding name available.
[ May 20, 2005: Message edited by: Steve Jiang ]
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!