Match Merge using Proc SQL


/ Published in: SAS
Save to your folder(s)



Copy this code and paste it in your 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;

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.