Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Grouping NULL values
>Does anyone have any nifty work arounds for grouping null values?
>
>ex/
> Select nvl(column1, 0), count(column1) from table1
> group by column1;
Change your count(column1) to count(*). The nvl function is not needed.
>
>If the values in the database are 1,2,3 and NULL it returns
>
>column1 Count(column1)
>------- --------------
>1 7
>3 4
>3 12
>0 0 I know there are null values in the table....
>
>Thanks in advance....
>------
>Robert
>
>
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + Jeff Thomas EMAIL: thomasjd_at_email.wpafb.af.mil + + 88 C-CG/SCTB Faces & Spaces Pest Control Expert + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Received on Tue Jan 02 1996 - 15:46:55 CST