dbms_utility.exec_ddl_statement errors when executing SQL that works just fine.
I'm trying to create a function that will return a timezone that is buried in the xml column (MY_XML_Column) of the table My_Tablename.
When I execute the results of the dbms_output.put_line( v_sql); in the middle of the stored procedure, it works just fine.
But when I try to use dbms_utility.exec_ddl_statement, I get the following errors:
Error report -
ORA-00905: missing keyword
ORA-06512: at "SYS.DBMS_UTILITY", line 574
ORA-06512: at line 17
00905. 00000 - "missing keyword"
*Cause:
*Action:
DECLARE
v_timezone_table varchar2(50):= 'my_tablename';
v_id number :=1;
v_sql varchar2(1000);
v_output_time_zone varchar2(50);