|
Hee-hee. "Wrong" covers a lot of territory. Can you say more about
*how* the results are wrong--what did you get, and what do you want?
Even better would be executable code w/sample data that illustrate the
issue.
BTW--like 98% of the time, in the course of writing up such a demo
program for a sas-l posting, I discover the problem and its solution on
my own.
Cheers,
-Roy
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Irin later
Sent: Thursday, July 20, 2006 6:50 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: WHERE clause vs JOIN syntax. Could it cause a problem?
I got a wrong result in the output and I wonder if it could be caused by
WHERE clause instead join syntax?
If not...what do you think might be the reason of inproper output?
Thank in advance,
Irin
PROC SQL;
CREATE TABLE OUT.PHARM_IR AS
SELECT T1.MEMBER,
T4.AGE,
T4.MEM_GENDER,
T1.TOS_CAT_CD AS TOS_CAT1_CD,
T4.PRODUCT,
T1.ALLOW_AMT,
T1.ETG_FAMILY,
T1.ETG
FROM PHARM AS T1,
member_demo AS T4
WHERE T1.MEMBER=T4.MEMBER AND
(T4.RISK_TYPE1_CD EQ 'A' OR T4.RISK_TYPE1_CD EQ 'I') and
episode_num ne '0' AND episode_num ne ' '; QUIT;
---------------------------------
See the all-new, redesigned Yahoo.com. Check it out.
|