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>
From: Bas Pruijn <bas.pruijn@CMG.NL>
Subject: Re: Decode in SAS SQL
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
|