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

Error while Executing a Dynamic SQL in Teradata Stored Procedure - response (4) by Fred

$
0
0

SELECT is not valid for EXECUTE IMMEDIATE. If you want to build a SELECT statement dynamically, use a dynamic cursor
DECLARE C1 CURSOR FOR S1;
PREPARE S1 FROM UPD_STRING;
OPEN C1;
 
If the SELECT statement is always the same, you probably don't need the dynamic / PREPARE form; a static cursor would do.


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>