abajo es mi consultaObteniendo no. de filas afectadas después de ejecutar consulta de selección en SQL Server 2005
select
@monNameStr as [MName],
IsNull(count(c.AssignmentID),0),
IsNull(sum(s.ACV),0),
IsNull(sum(s.GrossReturn),0),
IsNull(sum(s.NetReturn),0),
IsNull(avg(a.Total),0)
FROM
dbo.Assignment_ClaimInfo c,
dbo.Assignment_SettlementInfo s,
dbo.Assignment_AdvCharges a
Where
c.Assignmentid=s.Assignmentid and
s.Assignmentid=a.Assignmentid and
a.Assignmentid in
(select AssignmentID from dbo.Assignment_ClaimInfo
where (upper(InsuranceComp)=upper(@CompName) or upper(@CompName)='ALL COMPANIES')
and (DateName(month,DATEADD(month, 0, DOFileClosed))+' '
+cast(year(DATEADD(month, 0, DOFileClosed)) as varchar)[email protected]))
Group By c.InsuranceComp
Order By c.InsuranceComp
where @monNameStr is calculated date field like 'October 2009'
Lo que necesito saber el no. de registros afectados por esta consulta de selección.
NO NECESITO AGACHAR ESTE CONSEJO PARA OTRA CONSULTA CON LA FUNCIÓN COUNT().
Su valiosa ayuda es apreciada.
Gracias KM, Eres el hombre! – IrfanRaza