Date: Mon, 15 Dec 1997 23:29:35 -0500
Reply-To: Zihua lin <linzh@UCLINK4.BERKELEY.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Zihua lin <linzh@UCLINK4.BERKELEY.EDU>
Subject: Re: A "MERGE" problem
Content-Type: text/plain; charset="us-ascii"
Hi,
Try to use Proc SQl. But before you proceed it add a key varible, say KEY =
100 in
both data set a and set b. While you proc SQL make sure use where a.key =
b.key. as
a condition. It should work. I have helped a friend last week for a similar
problem and it worked.
Zihua Lin,
>At 08:05 PM 12/13/97 +0800, you wrote:
>>Hi all,
>>
>>I have a MERGE problem here and hope someone can provide help.
>>
>>Suppose I have the 2 dataset, A and B.
>>
>>
>>dataset A
>>AVAR1 AVAR2 AVAR3
>>10 20 30
>>20 30 40
>>30 40 50
>>40 50 60
>>
>>dataset B
>>BVAR1 BVAR2
>>1 2
>>2 3
>>
>>
>>I want to merge two together so there are 8 observations 5 variables as
>>follow:
>>
>>AVAR1 AVAR2 AVAR3 BVAR1 BVAR2
>>10 20 30 1 2
>>10 20 30 2 3
>>20 30 40 1 2
>>...
>>
>>40 50 60 2 3
>>
>>I try the following code by it fails:
>>
>>DATA M;
>> MERGE A B;
>>
>>Can anyone can give me some suggestions?
>>
>>
>>Thanks and best regards,
>>
>>Antonio
>>
>>
|