| Date: | Sun, 16 Nov 2003 15:55:29 -0500 |
| Reply-To: | tin-shun-jimmy chan <jimmy.chan@HEC.CA> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | tin-shun-jimmy chan <jimmy.chan@HEC.CA> |
| Subject: | merging two dataset |
| Content-Type: | text/plain; charset=us-ascii |
Hi,
I want to merge two dataset (let say dataset1 and dataset2) according
to a variable named CODE, the first one has 75 observations and the
second one has 1477 observations. Here is the following codes i used,
proc sql;
create table newdataset as
select a.*, b.*
from dataset1 as a left join dataset2 as b
on a.code=b.code;
quit;
although i succeded to merge the two datasets, instead of having 75
observations, now i have more than 2000 observations (the desired
results appear only at the end of the sheet with the precedent
observations = .). So, could someone tell me why ? (I just think there
is nothing wrong with my codes).
Thank you so much.
Jim
|