I have few columns in the table(RP1, RP2, RP3, RP4). I want to create a function which is passed 1, 2, 3, 4 as an argument based on which a select statement is executed.
How can I pass column name as variable to the SQL.
Thanks in advance.
Look for "Execute immediate" function. You can use it in scripts.
If you need it in DataWindow, you can prepare proper string in stored procedure and build DataWindow based on that procedure.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.