Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use Column Name as Variable in Powerscript

Status
Not open for further replies.

emily00

Programmer
Apr 20, 2009
3
0
0
US
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.

Mariaszek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top