Meaningless Drivel is fun!
The moose likes JDBC and Relational Databases and the fly likes Invalid Column Name error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Invalid Column Name error" Watch "Invalid Column Name error" New topic

Invalid Column Name error

Brian E

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

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?
I agree. Here's the link:
subject: Invalid Column Name error
It's not a secret anymore!