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 (August 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 13 Aug 2001 14:13:26 -0700
Reply-To:     "Huang, Ya" <ya.huang@AGOURON.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Huang, Ya" <ya.huang@AGOURON.COM>
Subject:      Re: Decode in   SAS SQL
Comments: To: "Isson, Jean-Paul" <Jean-Paul.Isson@MICROCELL.CA>
Content-Type: multipart/alternative;

proc sql; select case when plan='p2' then 'p2' else 'p1' end as plan from yourdata ;

> -----Original Message----- > From: Isson, Jean-Paul [mailto:Jean-Paul.Isson@MICROCELL.CA] > Sent: Monday, August 13, 2001 2:07 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Decode in SAS SQL > > > Hi evryone, > I have a little question where I intend to use the sql > decode function. > I am extracting data from Oracle data source using > sas proc sql. > One of my variable called plan has value P1 P12 P13 P14 and P2. > I would like to import var plan by decoding variable > plan as the following: > if plan in (P11, P12, P13, P14) plan=P1 else plan=P2. > I would like to do this in sql procedure without using > a data step. > Does any one know How can I do that? > I appreciate any hint or idea from >


[text/html]


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