Date: Sat, 3 Jan 2004 08:49:08 -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: Merge and delete (Sas Newbie)
Content-Type: text/plain; charset="iso-8859-1"
To obtain a new dataset that contains the rows of data in File1 and File2
that have the same value of variable A:
create table new12 as
select t1.*,t2.C,t2.K from File1 as t1 inner join File2 as t2
The inner join selects rows in the intersection of the sets of File1.A and
File2.A values. That means that the values have to match exactly. Duplicates
of company symbol in either File1 or File2 will appear in the solution.
Duplicates in File1 and duplicates in File2 will produce multiple pairs of
Sent: 1/3/2004 1:39 AM
Subject: Merge and delete (Sas Newbie)
I have two files:
File One has variables: Date Variable A Variable B Variable M
File Two has variables: Date Variable A Variable C Variable K
Variable A is the Company Symbol. The Company Symbol appearing in
File Two is a subset of the of Variable A (Company Symbol) appearing
in File 1. I want to keep only the common company symbols in these
files and delete the others.
Any suggestions. Do you need more information???