Hi Everyone,
Currently when I run my query, there are cases whereby there will be duplicate rows (with only one data item is different, not critical)
The below is the example (ID is the unique key):
Original Data
ID Name Date
1 joe 11/11/11
1 joe 12/11/11
2 Mary 11/11/11
3 Jane 12/12/11
3 Jane 13/12/11
Hope to achieve
ID Name Date
1 joe 11/11/11
2 Mary 11/11/11
3 Jane 12/12/11
In SAS VA data query, what should I do in order to achieve that?
Thank You
Try this...
proc sort data=[Original Data];
by id date;
run;
data [New Data];
set [Original Data];
by id;
if first.id then unique=1;
if unique=1;
run;
Thank you for pointing it out. I didn't recognized that it was posted in VA.
@LinusH Thanks for the reply. The requirement is for specific graph. So in the data query (SAS VA), we can sniff out this kind of requirement?
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.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.