Larry Brister
asked on
Select Count 2 columns
I have a table that has a column called afsTransaction
In the column can be any integer from 0 to 10000
I need a single select statement so that I get the UID, count(afsTransactions=0), count(afsTransactions <>0)
My currect (partial) select is attached.
In the column can be any integer from 0 to 10000
I need a single select statement so that I get the UID, count(afsTransactions=0), count(afsTransactions <>0)
My currect (partial) select is attached.
Set @afsCount = (Select Count(*)
from proc_cfa.dbo.P_AvailableForSale
where substring(afsSource,4,4) = @DealID
and
afsTransaction <> 0)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER