I'm trying to create a single SQL statement which will give a number of different count(conditional) reading the same variable.
What I tried is using "sum(IIF(,,)) as xxx" several times in my select.
Here is an instance of what I did.
SELECT sum(IIF(rrspcont = 0,1,0)) as rrsp0,
sum(IIF(rrspcont = 1,1,0)) as rrsp1, and so fourth
FROM...
Can I group the IIF in another IIF and still keep the same results?
(sum(IIF(rrspcont = 0,1, IIF(...) without changing the variable
name to store the result?
Does anyone know if this is possible?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only