Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error java.sql.SQLException: ORA-00923

 
Ayeda AngeL
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
 
Craig Jackson
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
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.
 
Jason Cox
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic