Thanks so much! And what your code does is VERY useful -- there are many instances where a correlated subquery is much easier and straightforward than a ton of reflexive joins. I know this is a comically simple example, but rest assured you've saved me a LOT of work! I just had to switch your code so that it does a LEFT join with the second table and it gave me exactly what I needed (see below) Thanks again for your help! I figured SAS had this capability. The syntax is just a tiny bit different from that of SQL Server, and I had searched all over for it without success. SELECT table1.ID, table1.FirstName, (SELECT HomeTown FROM table2 WHERE table2.ID=table1.ID) AS HomeTown FROM table1 LEFT JOIN table2 on table1.id=table2.id;
... View more