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:         Tue, 14 Aug 2001 08:53:13 +0200
Reply-To:     Bas Pruijn <bas.pruijn@CMG.NL>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:     To: "Isson, Jean-Paul" <Jean-Paul.Isson@MICROCELL.CA>
From:         Bas Pruijn <bas.pruijn@CMG.NL>
Subject:      Re: Decode in   SAS SQL
Comments: To: SAS-L@LISTSERV.VT.EDU
Content-Type: text/plain; charset="iso-8859-1"

how about

SELECT SUBSTR(plan,1,2) AS plan FROM ....

Greetings, Bas

-----Original Message----- From: Isson, Jean-Paul To: SAS-L@AKH-WIEN.AC.AT Sent: 8/13/2001 11:06 PM 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


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