J
Juan Robledo
I need help about this crosstab query that works fine in an AccessDataSorce
(Asp.net 2.0)
Now i'm trying to pass all the web to sqlDataSource and i have troubles in
this part of the string:
IIf(Count([CatB])<[NTJugados],0,Min(IIf([CT] Between 24 And 28,[PBh],Null)))
AS Peor,
How can i translate that part ?
I have tried with case(count(Catb)....) but always get an error.
The complete query is the following:
SELECT CatB, NombreCompleto, Sum(PBh) AS Parc,
IIf(Count([CatB])<[NTJugados],0,Min(IIf([CT] Between 24 And 30,[PBh],Null)))
AS Worst, [Parc]-[Worst] AS Neto, Sum(IIf([CT]=24,[PBh],Null)) AS Col01,
Sum(IIf([CT]=25,[PBh],Null)) AS Col02, Sum(IIf([CT]=26,[PBh],Null)) AS
Col03, Sum(IIf([CT]=27,[PBh],Null)) AS Col04, Sum(IIf([CT]=28,[PBh],Null))
AS Col05, Sum(IIf([CT]=29,[PBh],Null)) AS Col06
FROM cAuxRk
GROUP BY cAuxRk.CatB, cAuxRk.NombreCompleto, cAuxRk.NTJugados
ORDER BY cAuxRk.CatB, Sum(cAuxRk.PBh) DESC;
Thank you.
Juan.
(Asp.net 2.0)
Now i'm trying to pass all the web to sqlDataSource and i have troubles in
this part of the string:
IIf(Count([CatB])<[NTJugados],0,Min(IIf([CT] Between 24 And 28,[PBh],Null)))
AS Peor,
How can i translate that part ?
I have tried with case(count(Catb)....) but always get an error.
The complete query is the following:
SELECT CatB, NombreCompleto, Sum(PBh) AS Parc,
IIf(Count([CatB])<[NTJugados],0,Min(IIf([CT] Between 24 And 30,[PBh],Null)))
AS Worst, [Parc]-[Worst] AS Neto, Sum(IIf([CT]=24,[PBh],Null)) AS Col01,
Sum(IIf([CT]=25,[PBh],Null)) AS Col02, Sum(IIf([CT]=26,[PBh],Null)) AS
Col03, Sum(IIf([CT]=27,[PBh],Null)) AS Col04, Sum(IIf([CT]=28,[PBh],Null))
AS Col05, Sum(IIf([CT]=29,[PBh],Null)) AS Col06
FROM cAuxRk
GROUP BY cAuxRk.CatB, cAuxRk.NombreCompleto, cAuxRk.NTJugados
ORDER BY cAuxRk.CatB, Sum(cAuxRk.PBh) DESC;
Thank you.
Juan.