• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Error java.sql.SQLException: ORA-00923  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Well i have this error which i dont know how to solve. I dont get any error in my code, but when compiling my JSP code i get the following error
java.sql.SQLException: ORA-00923: FROM keyword not found where expected
Can anyone explain what does it means? and the way to solve it??
Thanks,
Ayeda
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well this is not a jsp/servlet type issue. I am assuming you are trying to get data from an Oracle database.

java.sql.SQLException: ORA-00923: FROM keyword not found where expected
Can anyone explain what does it means? and the way to solve it??


Well, without seeing the actual SQL code, I will guess that your SQL SELECT statement is missing the FROM keyword. And the way to solve it is to break out the old SQL syntax manual. If you don't have one there are alot of free beginner tutorials on the internet.
I hope this helps.
Craig
 
Author and ninkuma
Marshal
Posts: 66787
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the JDBC forum.
As cj pointed out, I'm not sure anyone is going to be able to help you without the SQL statement that's causing the problem.
 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check your actual SQL statement and make sure there is a space between the 'FROM' declaration and whatever the query is before it. Make sure you also do not have a comma before it.
Examples -
SELECT column_name FROM table_name WHERE column_name = ? // CORRECT!!!
SELECT column_nameFROM table_name WHERE column_name = ? // BAD!!!
SELECT column_name, FROM table_name WHERE column_name = ? // BAD!!!
This is especially important if you are using a StringBuffer or String concantonation(sp?) to build the SQL statement. It's fairly typical to be off on the spacing or inserting a trailing comma before 'FROM' is declared. Also, you need to use it in the same place as I specified.
Great tutorial on SQL can be found at -
http://www.w3schools.com/
[ January 27, 2004: Message edited by: Rob Aught ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!