is it possible to have a count function that counts all values that are greater than 2, but rather than excluding the values that are less than 2 from the query, have them show up as zeros?
Try
[blue][tt]
Select
IIF ( fld <= 2, "0", ">2" ) As [FieldRange],
Sum ( IIF ( fld <= 2, 1, 0 ) ) As [CountofFields]
From tbl
Group By IIF ( fld <= 2, "0", ">2" )
[/tt][/blue]
will count all the fields greater than 2. You will get 2 records ... one with [FieldRange] = "0" and one with [FieldRange] = ">2" and a count for each.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.