|
|
Archives of the TeradataForum
Message Posted: Fri, 23 Nov 2002 @ 04:58:26 GMT
Subj: | | Re: Syntax error in Stored Procedure |
|
From: | | Fred W Pluebell |
You can never use a host variable that way in SQL, and you can't use the ":" to reference a local variable. But "dynamic SQL" allows you
to build SQL statement text at run time. For example, use an INSERT/SELECT statement such as this:
CALL DBC.SysExecSQL('insert into arifdb.tableinfo SELECT '''||
:row_cursor.Tablename||''', COUNT(*) from '||:row_cursor.Tablename);
| |