I have a dataset
columns: A B C D
APPLE BALL 123 .
APPLE BALL . 123
I WANT AN OUTPUT TO BE LIKE FOLLOWING
A B C D
APPLE BALL 123 123
How can I solve this in single step ? Thanks
If it takes just column A to determine a unique observation:
data want;
update have (obs=0) have;
by a;
run;
If it takes the combination of both columns A and B, switch to:
data want;
update have (obs=0) have;
by a b;
run;
In any case, the data need to be in sorted order to be allowed to use the BY statement.
If it takes just column A to determine a unique observation:
data want;
update have (obs=0) have;
by a;
run;
If it takes the combination of both columns A and B, switch to:
data want;
update have (obs=0) have;
by a b;
run;
In any case, the data need to be in sorted order to be allowed to use the BY statement.
I figured out a way. Thank you.
@purveshrana for completion, please post the solution or mark one here as correct.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.