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
column, the PROC SQL outer union does not produce the same output
unless the keyword CORR is also used. CORR causes the same-named columns
(in this example, the two columns named X) to be overlaid; without
CORR, the OUTER UNION operator includes both of the same-named columns
in the result set. The DATA step program generates only one column
X.
The two concatenation
techniques shown above also vary in efficiency. A PROC SQL set operation
generally requires more computer resources but might be more convenient
and flexible than the DATA step equivalent.