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 Invalid Column Name error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Invalid Column Name error" Watch "Invalid Column Name error" New topic
Author

Invalid Column Name error

Brian E
Greenhorn

Joined: Sep 07, 2001
Posts: 12
I am working with Oracle 8.1.7 on Tomcat 4.0 (Apache).
Here is my SQL taken from my JSP:

The query works fine and gives the desired results in PL/SQL Developer. Yet when I take it into my JSP I get the following error:
java.sql.SQLException: Invalid column name
I've tried placing it in a PreparedStatement as well as a regular Statement. Both give me the same error. I've tried using all different combinations of aliases on my tables and columns but am getting the same error every time.
Anyone out there have an idea for me?
Brian E
Greenhorn

Joined: Sep 07, 2001
Posts: 12
I created a View in Oracle and accessed it that way. It worked fine. I'm glad that the problem is solved, but it seems to me that it should have worked the other way as well.
Any ideas?
 
 
subject: Invalid Column Name error
 
Similar Threads
How to do a query on a string type that is NOT case sensitive?
SQL statement to java
Cannot view data in pop-up window in ascending order
CLI0115E Invalid cursor state
java.sql.SQLException: ORA-00923: FROM keyword not found where expected