O
Offace
Hi NewsGroup,
Have a query which selects distinct records from a column in a table given a
certain parameter. The column allows nulls and want to execute a distinct
select command on the table giving me the distinct values and a count of
them. Only issue is I get a count of 0 (zero) for null values. Here's my
query,
PARAMETERS [filterID] LONG;
SELECT DISTINCT [D].[Value], COUNT([D].[Value]) AS [Count]
FROM [tblFilterData] AS D
WHERE ([D].[FilterID] = [filterID])
GROUP BY [D].[Value]
ORDER BY [D].[Value] ASC;
This returns something like;
Value Count
------ -------
0 <---There's the nulls
1 5
2 4
What do I do to get the Null count?
Many thanks and regards,
Offace.
Have a query which selects distinct records from a column in a table given a
certain parameter. The column allows nulls and want to execute a distinct
select command on the table giving me the distinct values and a count of
them. Only issue is I get a count of 0 (zero) for null values. Here's my
query,
PARAMETERS [filterID] LONG;
SELECT DISTINCT [D].[Value], COUNT([D].[Value]) AS [Count]
FROM [tblFilterData] AS D
WHERE ([D].[FilterID] = [filterID])
GROUP BY [D].[Value]
ORDER BY [D].[Value] ASC;
This returns something like;
Value Count
------ -------
0 <---There's the nulls
1 5
2 4
What do I do to get the Null count?
Many thanks and regards,
Offace.