BookmarkSubscribeRSS Feed
mauri0623
Quartz | Level 8

Hello and Happy Friday,

 

I have two tables that I want to replace the values of one by another. I need to replace the values of table Psudo_alcs with the values of real_alcs.

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

I don't get this. Do you simply want to replace all values in one table with all the values from another table?

 

Then why not simply rename the second table?

mauri0623
Quartz | Level 8

Yes but how?

PeterClemmensen
Tourmaline | Level 20

Do like this. I just create an example data set a

 

data a;
    a=1;
run;

proc datasets lib=work nolist;
    change a=b;
run;quit;

So in your case, it will be something like

 

proc datasets lib=work nolist;
    change real_alcs=Psudo_alcs;
run;quit;

If your data is not in the work library, then change the lib= part

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1332 views
  • 0 likes
  • 2 in conversation