Execute immediate results in ora-00911 invalid character

Note to self: when receiving this error while executing DML using execute immediate, check for a semicolon (;) at the end of your statement. REMOVE!

Today is not a good day for writing code. After my battle with my unintended recursive procedure I got stuck again debugging for an hour and pulling my hair why o why the generated DML was working perfectly from SQL developer, but not from PL/SQL. After one hour I did what I should have done 50 minutes earlier. Googled and found the obvious answer I was missing… my DML contained a semicolon.

Let’s just say it’s one of those days!


Posted in Oracle, PEBKAC, Pl/Sql Tagged with: , ,

Leave a Reply