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

Variable results from an sql statement - response (2) by Fred

$
0
0
Interesting workaround. The more general answer is to use a cursor (even if the SELECT returns only one row): SET sql_stmt = 'SELECT COUNT(*) FROM DM_JNJCHF_TEST WHERE PT_ID = ?'  ; DECLARE C1 CURSOR FOR S1; PREPARE S1 FROM sql_stmt; OPEN C1 USING t_random_num; FETCH C1 INTO t_dups; CLOSE C1;

Viewing all articles
Browse latest Browse all 14773

Trending Articles



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