SAS Joining Data
SAS offers 2 methods for joining tables.
Contents
Merge
The merge statement can be used in a data step.
data LIBREF.NEWTABLE; merge LIBREF.OLDTABLE1 (in=FLAG2) LIBREF.OLDTABLE2 (keep=ID in=FLAG2); by ID; if FLAG1 and FLAG2; run;
This is a demonstration of an inner join.
Proc SQL
See SQL.