sas Using Joins in SAS Vertical Joining


Example

Vertical join appends dataset B to dataset A providing both of them have similar variables. For example, we have sales for the month of Jan'17 in dataset A and sales for Feb'17 in dataset B. To create a dataset C that has sales of both Jan and Feb we use Vertical Join.

PROC SQL;
CREATE TABLE C AS
SELECT *
FROM A
UNION 
SELECT *
FROM B;
QUIT;

Now dataset C has observations from both A and B and is appended vertically.