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

What is dynamic sql - response (7) by kuntal.h.shah

$
0
0
That Helped. Thanks. One more question, I need to pass string as parameter and need to use in WHERE clause. For example in a dynamic SQL, 'SELECT * FROM DBC.COLUMNS WHERE TABLENAME =' || TB1 || .. ; The above doesn't work as say when I pass TB1= 'SRC_TB' - it doesn't go as 'SRC_TB'. It goes as SRC_TB (without any quotes) and that throws an error. I tried few options like below but nothing worked. 'SELECT * FROM DBC.COLUMNS WHERE TABLENAME =' || ''TB1'' || ... ; 'SELECT * FROM DBC.COLUMNS WHERE TABLENAME =' || '' || TB1 || '' || .... ; Any suggestions ? Thanks.

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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