If I have a dataset with several variables and then want to
link up that dataset to another set , for eg...
Dataset 1:
ID Pass/Fail Type
1 pass Type1
2 Fail Type2
3 fail Type1
4 pass Type2
5 fail Type1
DATSET 2:
ID GROUP
1 A
2 B
3 C
4 D
5 E
How can I use ID from dataset 2 and check if they are type 1
in dataset 1 and check whether it failed or passed ?
And how can I make it more dynamic, as I will have to do
this every month with a new data but same variables.
Thanks
DATA TEST_1;
INPUT ID Pass_Fail:$4. Type:$5.;
DATALINES;
1 pass Type1
2 Fail Type2
3 fail Type1
4 pass Type2
5 fail Type1
;RUN;
DATA TEST_2;
INPUT ID GROUP:$1.;
DATALINES;
1 A
2 B
3 C
4 D
5 E
;RUN;
PROC SQL;
CREATE TABLE WANT AS
select a.*,b.GROUP
from test_1 a
left join test_2 b on a.id = b.id
where a.type = 'Type1';
QUIT;
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 save with the early bird rate—just $795!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.