Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with aggregate query
Randy,
The function that you are looking for which predates CASE is DECODE.
You can say:
SUM(decode(e.xstatus, 'A', 1, 'P', 1, 'X', 1, 0)) as regist
That is the same as the case statement I sent you, i.e.
if 'A' then 1
else if 'P' then 1
else if 'X' then 1
else 0
Hope this helps,
Kevin
"Randy Harris" <notvalid_at_no.spam> wrote in message
news:OPg7e.2147$bc2.492_at_newssvr17.news.prodigy.com...
> Kevin, I got it working. Thanks very much for the point in the right
> direction.
>
>
Received on Fri Apr 15 2005 - 02:42:34 CDT
![]() |
![]() |