Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Teradata query doubt important - response (6) by dnoeth

$
0
0
You should mention the exact error message instead of "doesn't work". When you want a SP to return answer sets you have to define it with "dynamic result sets": replace procedure GetQuery(OUT xToken varchar(2000)) dynamic resuklt sets 1 and use a cursor for the select instead of "execute immediate": begin   declare c cursor with return only for s;   prepare s1 from sqlQuery;   open c1; end; But, you defined sqlQuery as a VarChar(2000) and try to insert 400 times "select * from (select ... as x) dt union", which estimates to roughly 16KB. And you forgot to add a final semicolon to the query text. Dieter

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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