Date: Sun, 28 Jan 2007 13:26:46 -0500
Reply-To: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject: Re: Comparing observation in two data sets
Content-Type: text/plain; charset="iso-8859-1"
A UNION of two datasets 'stacks' the rows in each into one dataset. It eliminates duplicated rows. The UNION CORRESPONDING operation lines up column variables that have the same label (though they must have the same data type as well).
This form of query implements the UNION CORR operation:
create table dsBoth as
select * from
(select * from ds1)
(select * from ds2)
From: firstname.lastname@example.org on behalf of Hari Koduvely
Sent: Sun 1/28/2007 10:07 AM
Subject: Comparing observation in two data sets
I have two data sets with same variables. Only thing is that there are
missing observations in both the data sets which are not the same. How
do I compare the observations in both the sets, delete the
observations in one data set which are missing in the other set and
merge the two sets so that all the non-missiong observations are
Thanks for your suggestions.
Dr. Hari Koduvely