Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: EASY ? Case statement
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
![]() |
![]() |