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 (October 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 19 Oct 2006 11:57:24 -0400
Reply-To:   Ken Borowiak <EvilPettingZoo97@AOL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Ken Borowiak <EvilPettingZoo97@AOL.COM>
Subject:   Re: wild card

On Thu, 19 Oct 2006 08:23:45 -0700, phillyj <jessica.donato@GMAIL.COM> wrote:

>Hi everyone: > >Im trying to use a wild card to select all observations with the >specified letters in them. For example my code is: > >Data SurgeryPrim; >Set PSurgery; >if DrugProcSite in ("Mast%", "modified%", "mrm%", "mat%", "quad%") then > v009=1; else v009=2; >run; > >This code is not working though. Any suggestions for what i did wrong? > I also tried to remove the & and keep only quotes. > >Thanks for your help!

Jessica,

The '%' and '_' wildcards are used in conjuction with the LIKE operator, which is not a valid operator in IF(-THEN-ELSE) statements.

HTH, Ken


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