Using a prompt, which takes a single integer numeric value, eg 4. How can I use this prompt to create a dynamic column name.
I use the prompt value to bring through certain columns, called something like "Names".
I would like to be able to name the columns something like "Names_Year_X".
Where X is the prompt value.
I have tried referring to the prompt value by using methods such as "Names_Year_&Prompt" and "Names_Year_&&Prompt&Prompt".
However, none of the above methods work, nor do a number of others I've tried. Does anyone have any advice for house this might work? Preferably using the Query Builder, but if not using a program node for some code is a secondary back up option.
Please post the full code you used to create the dynamically named column.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.