= SAS Joining Data = SAS offers 2 methods for joining tables. <> ---- == Merge == The `merge` statement can be used in a [[SAS/DataStep|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 [[SAS/SQL|SQL]]. ---- CategoryRicottone