If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Getting a null value to display zero in count query
How can I get this query to yield a zero when the count of the field "ID" is
zero? SELECT [QRY IP Falls U parameter].[Unit location of incident], [QRY IP Falls U parameter].Shift, Count([QRY IP Falls U parameter].ID) AS [2005 Falls] FROM [QRY IP Falls U parameter] WHERE ((([QRY IP Falls U parameter].[Date of incident]) Between #1/1/2005# And #12/31/2005#)) GROUP BY [QRY IP Falls U parameter].[Unit location of incident], [QRY IP Falls U parameter].Shift; Thanks. |
#2
|
|||
|
|||
Getting a null value to display zero in count query
Nz(COUNT([QRY IP Falls U parameter].ID), 0)
instead of Count([QRY IP Falls U parameter].ID) Vanderghast, Access MVP "kahaymon" wrote in message ... How can I get this query to yield a zero when the count of the field "ID" is zero? SELECT [QRY IP Falls U parameter].[Unit location of incident], [QRY IP Falls U parameter].Shift, Count([QRY IP Falls U parameter].ID) AS [2005 Falls] FROM [QRY IP Falls U parameter] WHERE ((([QRY IP Falls U parameter].[Date of incident]) Between #1/1/2005# And #12/31/2005#)) GROUP BY [QRY IP Falls U parameter].[Unit location of incident], [QRY IP Falls U parameter].Shift; Thanks. |
Thread Tools | |
Display Modes | |
|
|