Date: Mon, 10 Jul 2006 12:00:37 +0200
Reply-To: Gwenael Besnier <gwen_1973@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gwenael Besnier <gwen_1973@HOTMAIL.COM>
Subject: Re: proc sql, case-statement problem
In-Reply-To: <200607100938.k69NGkw7028546@mailgw.cc.uga.edu>
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Hi,
maybe you should change your code in something like:
proc sql;
create table exposures7 as
select region, customer, exposure, date,
CASE currency
when 'E' then 9*amount
else amount
end as amount_new
from database.exposures
where type = '7';
quit;
HTH
Gwen
>From: Heman Hunters <hemanhunters@GMAIL.COM>
>Reply-To: Heman Hunters <hemanhunters@GMAIL.COM>
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: proc sql, case-statement problem
>Date: Mon, 10 Jul 2006 05:38:10 -0400
>
>I'm tryingthe following statement:
>
>proc sql;
> create table exposures7 as
> select region, customer, exposure, date,
> amount = CASE currency
> when currency = 'E' then 9*amount
> else amount
> end
> from database.exposures
> where type = '7';
>quit;
>
>This gives me the following error:
>
>ERROR: Operand of WHEN clause 1 is not the same data type as the CASE
>operand.
>
>Can anyone help me? Thanks a lot!!
_________________________________________________________________
Die neue MSN Suche Toolbar mit Windows-Desktopsuche. Suchen Sie gleichzeitig
im Web, Ihren E-Mails und auf Ihrem PC! Jetzt neu! http://desktop.msn.de/
Jetzt gratis downloaden!
|