Hola a todos, tengo el sigueinte problema: hago la siguiente consulta a la base de datos
SELECT A.DATETIME ,A.IDCLIENT,B.DESCRIPTION,
Sum(CASE WHEN A.IDVAR = 'WhD' THEN A.READVAL ELSE 0 END)
AS CANAL1,
Sum(CASE WHEN A.IDVAR = 'WhR' THEN A.READVAL ELSE 0 END)
AS CANAL2,
Sum(CASE WHEN A.IDVAR = 'F' THEN A.READVAL ELSE 0 END)
AS CANAL3,
Sum(CASE WHEN A.IDVAR = 'VarhD' THEN A.READVAL ELSE 0 END)
AS CANAL4,
Sum(CASE WHEN A.IDVAR = 'VArhR' THEN A.READVAL ELSE 0 END)
AS CANAL5,
Sum(CASE WHEN A.IDVAR = 'FP' THEN A.READVAL ELSE 0 END)
AS CANAL6
FROM READMASS A, TOPOLOGY B
WHERE A.DATETIME >= '2009-01-01 00:00.000' AND B.INSTYPE='Actaris SL7000' AND A.NOINS = B.NOINS AND B.DESCRIPTION LIKE '%TOTA%'
group by A.DATETIME,A.IDCLIENT,B.DESCRIPTION
ORDER BY A.IDCLIENT,A.DATETIME
hasta aqui todo bien, pero lo que necesito hacer ahora y no se como, es que me diga cuantas filas me me devuelve.