answersLogoWhite

0


Best Answer

You can not group a NULL value natively. You can however transform the NULL into so other unique value; dynamically, without writing this value to the database; and group by this.

You would accomplish this by implementing a coalesce T-SQL expression

For example lets say the MiddleName field is NULL in many cases and you want to to group by these.. You might want to turn this NULL into say an * for purposes of giving a value that you can group by.

Now you can group by all MiddleName entries and also use a where clause to excluded those values <> * giving you a sub grouping of those records ONLY having null.

The SQL command would look something like this:

SELECT coalesce(MiddleName, '*')

FROM YourTableNameHere

WHERE MiddleName LIKE '*'

GROUP BY MiddleName

The coalesce returns the first NON NULL value in the chain(you can have more than two values).

In the above example you will get the MiddleName if there is one and an * if the database value is NULL.

This is a SELECT so there is NO update to the database.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What group function can be used to perform a count that includes NULL values?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is COUNTIF an example of a logical function in Excel?

Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.Yes. It combines the logical function IF with the normal COUNT function, so that it counts values that meet a condition.


What is the name of the function that returns number of cells with numerical values?

The COUNT function.


What is a function to find the number of values in cells?

In Excel is it COUNT.


How do you apply count function in Excel 2003?

You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)You enclose the cells or range that you want to count within the brackets. So if you wanted to count how many cells had values in the cells from A2 to A20, the function would be like this:=COUNT(A2:A20)


What is the syntax for a COUNT function?

=COUNT(cells) Cells can be the reference to the cell range you want to count. Say you want to count values in the cells from A2 to V20, then you would do it this way: =COUNT(A2:V20)


What does count do in Excel?

Count counts the amount of values that are in cells. If you have a block of cells of which some have numbers and some don't, it will tell you how many have numbers. It counts cells with numbers, dates and times, but not text or logical values. To do those you need the Counta function. To count the amount of values in the cells from B2 to B20 you would do this: =COUNT(B2:B20)


If you want to know the number of numeric items in a list that contains both labels and values which Excel function would you use and what is the name of the function?

COUNT


Does The COUNT function in Excel returns the number of all cells in a range that contain any type of data?

No. The COUNT function counts only numeric values, including dates and times. It will not count cells with text or logical data or blank cells. COUNTA will count all kinds of data.


What does the COUNT function do in Excel?

The COUNT function counts the number of cells that contain numbers.Syntax: =COUNT(value1, value2,...value30)The arguments (e.g. value1) can be cell references or values typed into the Excel COUNT formula.


What is the difference between count and countA?

Count: counts the number of cells with numeric values in a range. Counta: counts the number of cells containing data (letters or numbers) in a range. Counta counts the number of non-blank cells in a range. Counta will therefore exclude any empty cells, which would be included if the count function were used.


What does the function counta do and what are its parameters in Excel?

The Excel COUNTA function counts the number of cells that are not empty in a range. The syntax is COUNTA(value1, [value2], ...).See related links for a site that explains the COUNTA function pretty well and has a video for it too.COUNTA is a function in MS Excel used to count numeric and non-numeric values both Take look at example = COUNTA(A1:A10) it will count all the numeric and non-numeric values present in A1 to A10 cells.


How do you enter the formula to count the number of cells with numbers in a range of cells?

You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)You use the COUNT function. Say your range was the cells for A2 to A20. In another cell you would enter the following function:=COUNT(A2:A20)