HI...
I have a tale with 4 columns, and I want to stack them and have an output table of just 2 columns.
Example:
Original Table:
SSN Code Spouse SSN S Code
111-11-1111 5 222-22-2222 6
333-33-3333 5 444-44-4444 1
Desired Table:
SSNs Codes
111-11-1111 5
333-33-3333 5
222-22-2222 6
444-44-4444 1
Is there any way of doing this...? Thanks for your help, I am kind of new with SAS EG...
try:
data temp1(keep=ssn code) temp2(keep=s_ssn s_code rename=(s_ssn=ssn s_code=code));
set have;
data want;
set temp1 temp2;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.