To build a dynamic SQL non-SELECT statement, you need to verify that the SQL statement you want to build is one that can be run dynamically and then build the SQL statement.
To run a dynamic SQL non-SELECT statement:
The following is an example of an application running a dynamic SQL non-SELECT statement (stmtstrg):
EXEC SQL EXECUTE IMMEDIATE :stmtstrg;