0 - 2 of 2 tags for sysexecsql

SET dyn_sql =
'Select TableName into hTableName from ' || TRIM(i_FullWorkTableName) ||
';'
;
call dbc. SysExecSQL(:dyn_sql)
;

SET dyn_sql =
'call sysdba.spETL_Table_' || hTableName|| '(:i_FullStageTableName);'
;
call dbc. SysExecSQL(:dyn_sql)
;

I get this when above is called. compiles correctly.

5568 SQL statement is not supported within a stored procedure.

What I am trying to do is call a stored procedure to work on specific table. I can get table name as an input parameter or sel from a table.
call spetl_a
call spetl_b
call spetl_c

Until you have Teradata V13 Statistics Wizard Easy Feature available for your Teradata installation, here is a set of stored procedures that will generate and/or run collect statistics statements based on a set of index, column and referential integrity rules.