I use SAS SQL to test for exceptions to rules that produce a count. I do this by building a string variable that contains text describing the exception with another variable that contains the exception count.
This is all done within the one SQL statement:
eg:
SELECT 'How many widgits' as DESCRIPTION,
COUNT (*) AS COUNTX
from z
DESCRIPTION COUNTX
How many widgits 10
The issue I have is when the count is zero the SQL produces no values or zero observations.
I'd like to know how to keep the column description but have the count set to zero.
... View more