File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes Weird SQL error. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Weird SQL error." Watch "Weird SQL error." New topic

Weird SQL error.

macko Crater

Joined: May 24, 2011
Posts: 2
Hi there,

I'm trying to use Java to create a View in SQL. I've been using Java before with no problems to insert data and tables, but right now I keep getting this error:

java.sql.SQLException: ORA-00911: invalid character

I've simplified my code down to it's bare bones, even the SQL statement, but it's still giving the error and I can't work out why. If I copy and paste the SQL statement into an SQL app, it works fine, but I need this to be automated through Java. Maybe you guys can help?

macko Crater

Joined: May 24, 2011
Posts: 2
Nvm, I fixed this. I can't have a ; at the end of the SQL statement, even though it's fine in an SQL app, it doesn't work with JDBC.
I agree. Here's the link:
subject: Weird SQL error.
Similar Threads
Invalid Descriptor Index
Unable to connect to MS SQL Server using JRun drivers
No suitable driver found
help me the following jdbc code and error message!
Getting a SQL Exception ?