Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. proc contents data=set1 noprint out=contents1 ; run;
  2. proc contents data=set2 noprint out=contents2 ; run;
  3.  
  4. proc sql ;
  5. create table in1_not_in2 as
  6. select name from content1
  7. where upcase(name) not in (select upcase(name) from content2)
  8. ;
  9. create table in2_not_in1 as
  10. select name from content2
  11. where upcase(name) not in (select upcase(name) from content1)
  12. ;
  13. quit;
  14.  
  15. proc sql noprint ;
  16. select name from content1
  17. into :in1_not_in2 separated by ' '
  18. where upcase(name) not in (select upcase(name) from content2)
  19. ;
  20. select name from content2
  21. into :in2_not_in1 separated by ' '
  22. where upcase(name) not in (select upcase(name) from content1)
  23. ;
  24. quit;
  25.  
  26. data both;
  27. set set1(drop=&in1_not_in2) set2(drop=&in2_not_in1) ;
  28. run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement