3

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>   
2
  • 1
    Please mention the sql query you are executing Commented Mar 11, 2014 at 12:31
  • 3
    think about it, your query is not properly ended... Commented Mar 11, 2014 at 12:32

3 Answers 3

4

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#
Sign up to request clarification or add additional context in comments.

Comments

3

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'

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.