Skip to Main Content
Statistical Programming in SAS
book

Statistical Programming in SAS

by John Bailer
April 2015
Intermediate to advanced content levelIntermediate to advanced
460 pages
14h 45m
English
SAS Institute
Content preview from Statistical Programming in SAS
68 Statistical Programming in SAS
Display 2.38 Table comparing merges of data sets using the DATA step with joins of data
sets using PROC SQL
Location of CITY
DATA Step
PROC SQL
Either in the
weather or
demography data
set
data in_either;
merge
SMSA_subset_weather2
(in=in1)
SMSA_subset_demog2
(in=in2);
by city;
weather2_in = in1;
demog2_in = in2;
run;
proc sql;
title "FULL OUTER JOIN";
select coalesce(w.city, d.city),
JanTemp,JulyTemp, Education,income
from
SMSA_subset_weather2 as w
full join
SMSA_subset_demog2 as d
on w.city=d.city;
quit;
In both the weather
and demography
data sets
data in_both;
set in_either;
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Elementary Statistics Using SAS

Elementary Statistics Using SAS

Sandra D. Schlotzhauer

Publisher Resources

ISBN: 9781607645047