sas Using Joins in SAS


Each database is a collection of different tables and each table contains different data in an organized way. While working with data, most of the times information we need is scattered in more than one table. We need joins/merge to get the desired output.

In SAS we use joins while working with Proc SQL and use merge while working with Data step. We will now talk only about joins inside Proc SQL.


Type of joinOutput
Proc SqlSQL procedure inside SAS
Create TableCreates a SAS dataset
SelectSelects required variables from respective datasets
WhereSpecifies particular condition
QuitEnd the procedure


As mentioned in the introduction, we can also use Mergeinside a data step which will be discussed under a separate topic. Joins play a very important role to blend and unify data according to the requirement.