user3543466
user3543466

Reputation: 31

Oracle ORA-00933: SQL command not properly ended?

I keep getting this error.
How do I solve this problem?

Error:

java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

Code:

<update id="updateProc" parameterClass="rating">
 update rating set
 rating_title=#rating_title#
 rating_cont=#rating_cont#
 where mem_id=#mem_id# 
 and rating_code=#rating_code#         
</update>   

Upvotes: 3

Views: 33369

Answers (3)

James-Jesse Drinkard
James-Jesse Drinkard

Reputation: 15723

You can also get this exact same error if you have quotes that are not properly closed or you forget to use double quotes inside of a statement with single quotes on the outside.

Upvotes: 0

Mureinik
Mureinik

Reputation: 312116

In Oracle, string literals are denoted by single quotes ('). So, if you plan to use literals:

UPDATE rating 
SET    rating_title='rating_title', rating_cont='rating_cont' 
WHERE  mem_id='mem_id' AND rating_code='rating_code'

Upvotes: 3

NiiL
NiiL

Reputation: 2827

Please put , between your columns of Set Clause like:

update rating set rating_title=#rating_title#, rating_cont=#rating_cont#
where mem_id=#mem_id# and rating_code=#rating_code#

Upvotes: 4

Related Questions