The SQL source statement contained in the host variable is prepared and executed.
For a fuller discussion of the use of EXECUTE statements in dynamic application programs, see the Mimer SQL Programmer's Manual, Dynamic SQL.
The EXECUTE IMMEDIATE statement may only be used for dynamically submitted statements with no parameter markers.
Dynamically submitted SELECT statements may not be executed with EXECUTE IMMEDIATE, these should be performed using a sequence of OPEN, FETCH and CLOSE statements.
Note:You can use singleton SELECT statements or calls to result set procedures if the result set will contain only one row.
strcpy(sqlstr,"DELETE FROM sometable WHERE id IS NULL");
exec sql EXECUTE IMMEDIATE :sqlstr;
For more information, see the Mimer SQL Programmer's Manual, Executable Statements.
Features outside core
Feature B031, “Basic dynamic SQL”.