Date: Fri, 20 May 2011 11:59:56 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: Patients who are in either of three tables
In-Reply-To: <47557.51450.qm@web39422.mail.mud.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1
What output do you need? Just the patient id? Everything?
Something like this would accomplish something like what you want, I would
think:
proc sql;
create table d as
select * from (
select * from a full outer join b
on a.patientid=b.patientid) ab
full outer join c
on ab.patientid=c.patientid
);
quit;
You can manipulate the select * to get what you need.
-Joe
On Fri, May 20, 2011 at 11:53 AM, Irin later <irinfigvam@yahoo.com> wrote:
> I am trying to get patients who are either in table1 or Table 2 or Table3.
> Should be not complicated ...but I am kind of confused at the end of Friday
> as it is a kind of an urgent matter...
> I have patients' id s, flag and program fields.
>
> How Can I implement it with code? I do not have any duplicats in either
> table.
>
> Could you please help me with that? Thank you in advance,
>
> Irin
>