• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ORA-00933 SQL Command not properly ended

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
read about your driver specification. most of the drives include this info about the joins, which you have mentioned.
reply
    Bookmark Topic Watch Topic
  • New Topic