Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Multiple selects
>
> "Rene Nyffenegger" <rene.nyffenegger_at_gmx.ch> wrote in message
> news:bjaek1$gb9tu$1_at_ID-82536.news.uni-berlin.de...
>> select >> count( >> case when >> this = 'that' and >> that = 'the other' >> then 1 >> else null end) "Count 1", >> count( >> case when >> this = 'this' and >> that = 'that' >> then 1 >> else null end) "Count 2", >> count( >> case when >> this = 'confusing' >> then 1 >> else null end) "Count 3" >> from >> myTable;
It doesn't make any difference.
> count(case when this = 'confusing' then 1else null end)
>
> is
>
> sum(case when this = 'confusing' then 1 else 0 end)
Everybody has his preferences.
Rene
-- Rene Nyffenegger http://www.adp-gmbh.chReceived on Sat Sep 06 2003 - 11:14:42 CDT