Posted By

webonomic on 05/24/08


Tagged

sql merge match dataset proc


Versions (?)

Match Merge using Proc SQL


 / Published in: SAS
 

URL: http://jaredprins.squarespace.com/blog/2008/6/3/match-merge-using-proc-sql.html

  1. data oldids;
  2. infile cards;
  3. input idfield2 matchfield;
  4. cards;
  5. 1 100
  6. 2 200
  7. ;
  8.  
  9. data unmatched;
  10. infile cards;
  11. input idfield2 matchfield;
  12. cards;
  13. . 100
  14. . 200
  15. ;
  16.  
  17. PROC SQL NOPRINT;
  18. UPDATE unmatched
  19. SET idfield2 = (SELECT idfield2
  20. FROM oldids
  21. WHERE unmatched.matchfield EQ oldids.matchfield);
  22. QUIT;

Report this snippet  

You need to login to post a comment.