• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ORA-00933 SQL Command not properly ended

 
David Krauza
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all -
I am writting a program in which I'm build a query statement based on options selected by the user. After the the statement is built I execute it via the executeQuery() method. I have been using the same set of options so I am always executing a query that I know should work. When I run the query via JDBC I get the following error:
java.sql.SQLException: ORA-00933: SQL command not properly ended.
However, when I run my test query from the SQL Plus utility, I get no such error.
I did read, somewhere, that if you use the GROUP BY clause you will get this error; I am not using that clause, I'm using the standard SELECT FROM WHERE (using INNER JOINs).
Has anyone ever seen this error before?
Thanks for you help.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the query you are trying to run? Are you building the string dynamically? If you are, log it or print it to System.out to see that it is what you expect. If your still having problems, post it here and we'll look at it.
 
saurabh mahajan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
read about your driver specification. most of the drives include this info about the joins, which you have mentioned.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic