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 (November 1998, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 4 Nov 1998 11:04:59 -0500
Reply-To:     "Gary M. McQuown" <mcquown@FENIX2.DOL-ESA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Gary M. McQuown" <mcquown@FENIX2.DOL-ESA.GOV>
Subject:      Solution to SQL, Mutually Exclusive Codes by ID
Content-Type: text/plain; charset="iso-8859-1"

Many thanks to Chris Lanning for his solution to this problem (below with very minor adjustments).

/* output cpt codes by case_no from extract where mutually exclusive codes (me_1 & me_2) were charged */

PROC SQL; create table excl_id as select case_no, me_2 as cpt from extract e, c_edit c where e.cpt=c.me_1 order by case_no, cpt ; quit;

proc sort data=extract; by case_no cpt; run;

/* keep only those records that are in both data sets */ data final; merge excl_id (in=x) extract (in=y); by case_no cpt; if y=1 & x=1;

run;


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