Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: EASY ? Case statement

Re: EASY ? Case statement

From: Klaus Zeuch <KZeuch_at_hotmail.com>
Date: Fri, 3 Nov 2000 00:37:37 +0100
Message-ID: <8tstt7$5t6$01$1@news.t-online.com>

Hi,

this works:
SQL> select case when ename = 'Scott' then 'IIII' else 'CCCC' end as test, ename from emp;

TEST ENAME
---- ----------
CCCC SMITH
CCCC ALLEN Klaus

"Olivier Villeneuve" <olivier.villeneuve_at_fra.sas.com> schrieb im Newsbeitrag news:8ts7lq$aqh$1_at_license1.unx.sas.com...
> Hi There,
>
> What is the right syntax to do this :
>
> select case ename when ('SCOTT') then 'IIII' else 'CCCC' end as test ,
> ename from emp;
>
> This code returns an error ORA-00923
>
> Best Regards,
> Olivier.
>
>
Received on Thu Nov 02 2000 - 17:37:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US