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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.