I made this query in Microsoft Access
which returns something like so
NeedThisSpace, NeedThisSpace2,Total,Passed,Failed,NA
63 56 6 7
but I can't get it to work in SQL 2000
all I get is a total for all
NeedThisSpace, NeedThisSpace2,Total,Passed,Failed,NA
63 63 63 63
I got this from "Books on line" but are the single quotes around the IIF acting like comments?
TIA
DougP, MCP, A+
Code:
SQLCode = "SELECT FieldsToUse AS NeedThisSpace, FieldsToUse AS NeedThisSpace2, FieldsToUse, " _
& "Count([Outcome]) AS Total, " _
& "Count('IIf([outcome]=1,[outcome],Null)') AS Passed, " _
& "Count('IIf([outcome]=-1,[outcome],Null)') AS Failed, " _
& "Count('IIf([outcome]=0,[outcome],Null)') AS NA " _
& "From Results " _
& "GROUP BY FieldsToUse;"
which returns something like so
NeedThisSpace, NeedThisSpace2,Total,Passed,Failed,NA
63 56 6 7
but I can't get it to work in SQL 2000
all I get is a total for all
NeedThisSpace, NeedThisSpace2,Total,Passed,Failed,NA
63 63 63 63
I got this from "Books on line" but are the single quotes around the IIF acting like comments?
TIA
DougP, MCP, A+