Go Lang Oracle – ORA-00933: SQL command not properly ended

While building some migrations with Goose I had some strange (for me) error, for which you can find a lot of different stuff on Google but nothing helped.

The error was like in the title: “ORA-00933: SQL command not properly ended” for this query

UPDATE table1 SET title = CONCAT('FORMER-', title) WHERE id <= 500;

This query will work without problems in SQL editor like Oracle SQL Developer but not in the GO adapter

The reason for this error is the space between the comma and title column in the CONCAT function, so the query should be like this:

 UPDATE table1 SET title = CONCAT('FORMER-',title) WHERE id <= 500;

Small tip: don't use space between params in the functions!

Leave a Reply

Your email address will not be published. Required fields are marked *