LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 21 Jul 2006 10:07:54 -0700
Reply-To:   "Pardee, Roy" <pardee.r@GHC.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Pardee, Roy" <pardee.r@GHC.ORG>
Subject:   Re: WHERE clause vs JOIN syntax. Could it cause a problem?
Content-Type:   text/plain; charset="us-ascii"

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.


Back to: Top of message | Previous page | Main SAS-L page