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

How to parametrize WHERE IN clause in stored procedure? - response (2) by veskojl

$
0
0
Hi Dieter, I understant that 'US,GE' <> 'US','GE' , the question is how to get the second from first? I alreary tried what you suggest and it doesn't work. SET QUERY = 'SELECT * FROM SOME_TABLE WHERE country_cd IN ('|| varlist || ');'; PREPARE S1 FROM QUERY; OPEN C1 ;The error thrown is CALL test('US'); CALL Failed. 5628: test:Column US not found in Database.SOME_TABLELooks like the varlist variable in the result QUERY string is taken for a column name Is there any important difference between the placeholder form and the concat form of the dynamic sql? SELECT * ...WHERE code = ? 'SELECT * ... where code = ' || variable

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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