Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Sql query
Originally posted by Guido Konsolke
> the (obvious) error is: using SELECT in the DECODE.
> It's simply not allowed.
>
Oh yes it is!
SQL> select deptno,
2 decode((select count(*) from emp where
emp.deptno=dept.deptno),
3 1,'one',2,'two',3,'three','more')4* from dept
10 three 20 more 30 more 40 more
-- Posted via http://dbforums.comReceived on Tue May 13 2003 - 06:54:19 CDT
![]() |
![]() |