SAS Joining Data

SAS offers 2 methods for joining tables.


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.


CategoryRicottone

SAS/JoiningData (last edited 2023-03-30 20:04:14 by DominicRicottone)