Hello, I've two tables. TableA has all observations. TableB has 30 observations, all of which are in TableA. They can be matched by an 'ID' How do I create a new variable in TableA indicating that all the observations in TableB are 'late' (ie., new variable name = late; all IDs found in TableB are coded with late=1 in TableA). I know a long way: use a data step, and use). Is there a way to do using subquery in SQL? data new; set tableA; late=0; if ID in ('0223', '0123', '0124' etc) then late=1; run; Thanks!
... View more