LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (November 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 9 Nov 2006 09:31:14 -0500
Reply-To:     Florio Arguillas <foa2@CORNELL.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Florio Arguillas <foa2@CORNELL.EDU>
Subject:      Re: newbi - anybody see anything wrong with this?
Comments: To: "Beaulieu, Serge (DHW/SME)" <Serge.Beaulieu@GNB.CA>
In-Reply-To:  <4B143AC8A58A0A42AC375A11B459CAE6033EA47C@GNBEX03.gnb.ca>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Serge,

here's one approach. I'm sure you'll be provided with a different approach by others in this list.

LIBNAME report "C:\Transition Files";

data report.dm_incidencesummaryrates; set report.dm_incidencesummaryrates;

if ((geo_location = 313) or (geo_location = 714) or (geo_location = 803) or (geo_location = 815) or (geo_location = 820) or (geo_location = 923) or (geo_location = 925) or (geo_location = 934) or (geo_location = 935) or (geo_location = 944) or (geo_location = 947) or (geo_location = 1019) or (geo_location = 1034) or (geo_location = 1035) or (geo_location = 1105) or (geo_location = 1207) or (geo_location = 1320) or (geo_location = 1410) or (geo_location = 1510)) then x=1; else x = 0; if x=0;

run;

At 08:54 AM 11/9/2006, Beaulieu, Serge (DHW/SME) wrote: >Hi Listees, > >Sorry to be back again so soon with what is likely an idiot question >from this local village idiot - but please indulge me. > >I have a bunch of records in a sas table. I want to delete all the >records where geo_location isn't one of the values below. Any ideas as >to what I am doing wrong here or should I be doing this through proc sql >or what? > >LIBNAME report "C:\Transition Files"; >data report.dm_incidencesummaryrates; set >report.dm_incidencesummaryrates; > if ((geo_location ^= 313) or (geo_location ^= 714) or > (geo_location ^=803) or (geo_location ^= 815) or > (geo_location ^= 820) or (geo_location ^= 923) or > (geo_location ^= 925) or (geo_location ^= 934) or > (geo_location ^= 935) or (geo_location ^= 944) or > (geo_location ^= 947) or (geo_location ^= 1019) or > (geo_location ^= 1034) or (geo_location ^= 1035) or > (geo_location ^= 1105) or (geo_location ^= 1207) or > (geo_location ^= 1320) or (geo_location ^= 1410) or > (geo_location ^= 1510)) then delete; run; > > > >Serge (local village idiot - loose on sas-l)


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