Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

DDL Statement , Dynamic SQL in a FOR cursor LOOP -SQLCODE 3772 - response (2) by dnoeth

$
0
0

There's no way to do this in an ANSI mode SP. 
If you can't switch to TD mode there's a workaround:
Don't EXECUTE the DDLs, but insert all of them into a Volatile Table adding a sequence number. Then run a second loop (based on the previous activity_count) to SELECT the individual DDL statements (WHERE seqence number = x) and EXECUTE/COMMIT each.
 
Dieter 


Viewing all articles
Browse latest Browse all 14773

Trending Articles