Hello, I am learning using PROC SQL to replace the data step for data extraction. I use PROC SQL / UPDATE statement, I found that I didn't update my data correctly, I lost some portion of my original ones. PROC SQL; update work, test set marital=case when marital in (2, 4) then 2 end, race=case when race in (3,5,6,7,8) then 7 when race in (4) then 9 end; quit; As showing above, I got "martial 2 and 4" changing to 2, but missing 1 and 3 original categories in the updated data. The same as race, I only got the 7 and 9 in race columns, but missing 1 and 2 original rows in the updated table. How to avoid this problem? Please advice. Thanks.
... View more