Date: Thu, 21 Aug 2003 14:28:04 +0200
Reply-To: "Jekabsons, Janis" <Janis.Jekabsons@DRESDNER-BANK.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Jekabsons, Janis" <Janis.Jekabsons@DRESDNER-BANK.COM>
Subject: Conditional merge
Content-Type: text/plain; charset="iso-8859-1"
Hi group,
my brain is experiencing some performance hindrances today, so I am counting
that your is tops ... Here's the question:
I have two tables that I want to combine them with a third. The tables look
as follows
data one;
a=1; b=0; active=1; output;
a=2; b=0; active=1; output;
a=3; b=0; active=1; output;
a=4; b=0; active=2; output;
a=5; b=0; active=1; output;
run;
data two;
a=0; b=-4; output;
a=1; b=-4; output;
a=2; b=-4; output;
a=3; b=-4; output;
a=5; b=-4; output;
run;
data three;
a=3; b=2; output;
a=4; b=2; output;
run;
I want to take work.one as basis and join it with two and three using the
rule:
if active=1 then read from two
else if active=2 then read from three
How could I do this?
Regards,
Janis Jekabsons
Dresdner Bank AG
CC RCO RMT MD SA
Jürgen Ponto Platz 1, 8th Floor
60301 Frankfurt/Main
Tel.: +49-(0)69-263-83648
Fax: +49-(0)69-263-59850
E-mail: janis.jekabsons@dresdner-bank.com
|