On my output file, I am changing the name of my columns and building a query using the output dataset file using the new column name. I see the new column name in the output of the new query I am using. However, when I run the entire project, the column name change is not permanent. Can I make it a permanant column name change?
I'm changing the column name in the SAS output by first unprotecting the data, then going to properties window and typing in a new name.
Without knowing your procedures, it's difficult to know exactly what you coded. However, if all you want to do is to permanently rename column(s), you can consider either:
proc dataset lib=libname;
modify target_dataset;
rename old_var_name = new_var_name;
run;
or in a proc sql step:
proc sql;
select old_var1 as new_var1_name,
old_var2 as new_var2_name
from target_dataset;
quit;
@req41273 wrote:
I'm changing the column name in the SAS output by first unprotecting the data, then going to properties window and typing in a new name.
Since this manual action is not recorded anywhere as a task in your project, it won't have any permanent effect.
Depending on how the dataset is created, there are numerous options to set the intended names.
where in query builder can this be done. Can you send me a step by step action on how to do this or a screen print?
where in query builder can this be done. Can you send me a step by step action on how to do this or a screen print
I've only seen where you can rename if it's a computed column, this column is not a computed column
Thanks
I found it.
This
@req41273 wrote:
Thanks
I found it.
is NOT a solution. Please post what you have really done, so others can profit from it. You got help here, so help others get help also.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.