File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes bind variable does not exist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "bind variable does not exist" Watch "bind variable does not exist" New topic
Author

bind variable does not exist

Steve Jiang
Ranch Hand

Joined: May 17, 2004
Posts: 106
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29241
    
139

Steve,
What does the plus sign mean at the end of the query?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Steve Jiang
Ranch Hand

Joined: May 17, 2004
Posts: 106
right out join. to set 0 for id when there is no corresponding name available.
[ May 20, 2005: Message edited by: Steve Jiang ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bind variable does not exist
 
Similar Threads
Mixing direct SQL with HQL in the same transaction
EJB-QL
OrderBy
"select new Constructor" in HQL
Hibernate Inner Join with AND criteria