Trying to automate update statements

I am unable to use execute non query correctly. Can someone please guide me what I am doing wrong.
I have to run an update statement like this:
EXEC Package_name.DML(‘update table_name set xyz=’‘123’’ where abc=‘‘456’’');
I have directly added above line into the execute non query part and it’s throwing the error:
Message: ERROR [42000] [Oracle][ODBC]Syntax error or access violation.
If I run the statement in SQL Developer/SQL*Plus it works fine.

I have resolved the issue by using Begin … End; instead of EXEC.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.