Comparing Outer Unions and Other SAS Techniques
A PROC SQL set operation that uses the OUTER UNION
operator is just one SAS technique that you can use to concatenate
tables, as shown in the following programs. Program 1 is the PROC
SQL set operation that was shown earlier in this chapter. Program
2 uses a different SAS technique to concatenate the hypothetical tables
One and Two.
Program 1: PROC SQL OUTER UNION Set Operation with CORR
proc sql;
create table three as
select * from one
outer union corr
select * from two;
quit;
Program 2: DATA Step, SET Statement, and PROC PRINT Step
data three;
set one two;
run;
proc print data=three noobs;
run;
These two programs create
the same table as output, as shown below.
When tables have a same-named ...