- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please please tell me what is wrong with this code. it is not working.
/*Merging visit and std elements datasets by unique id*/
data JanFeb_COMPLETE_2019;
merge janfebs.CONCATENATE_JAN2FEB_2019(in=A) CONCATENATE_KEENAN_CLN19(in=B);
by UNIQUE_ID;
If a and b;
run;
the log says
3142 data JanFeb_COMPLETE_2019;
3143 merge janfebs.CONCATENATE_JAN2FEB_2019(in=A) CONCATENATE_KEENAN_CLN19(in=B);
3144 by UNIQUE_ID;
3145 If a and b ;
3146 run;
NOTE: There were 702 observations read from the data set JANFEBS.CONCATENATE_JAN2FEB_2019.
NOTE: There were 79 observations read from the data set WORK.CONCATENATE_KEENAN_CLN19.
NOTE: The data set WORK.JANFEB_COMPLETE_2019 has 0 observations and 69 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
if a and b;
Do you understand what this does?
There are no values of UNIQUE_ID that appear in both incoming data sets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I just checked
There are values of UNIQUE_ID that appear in both incoming data sets I just checked.
It works if I say if a or if b but it just does not work when I say if a and b.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please help me to figure out what is wrong in this code. I am trying to merge data from two data sets if the records are in both data sets.
data JanFeb_COMPLETE_2019;
merge CONCATENATE_KEENAN_CLN19 (in=B) janfebs.CONCATENATE_JAN2FEB_2019(in=A);
by UNIQUE_ID;
If a and b;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Maxim 3: Know Your Data.
You do not have any matches.