| Author |
Error java.sql.SQLException: ORA-00923
|
Ayeda AngeL
Greenhorn
Joined: Jan 18, 2004
Posts: 7
|
|
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
Joined: Mar 19, 2002
Posts: 405
|
|
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
Joined: Jan 10, 2002
Posts: 56229
|
|
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.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Jason Cox
Ranch Hand
Joined: Jan 21, 2004
Posts: 287
|
|
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 ]
|
<a href="http://www.unfetteredblather.com" target="_blank" rel="nofollow">Unfettered Blather</a> - Updated daily nonsense
|
 |
 |
|
|
subject: Error java.sql.SQLException: ORA-00923
|
|
|