Jeff here's the SP
---
the number of operators for whom this RecordSet is returned from the SP is approx. 80
ALTER Procedure dbo.usp_Opr_Productivity_Fetch
@PUserId varchar(30),
@PFromDate datetime,
@PToDate datetime
as
Begin
IF @PFromDate is null
Set @PFromDate = dateadd(day,-1,getdate())
IF @PToDate is null
Set @PToDate = getdate()
select count(al_id) No_of_Forms,al_formgroup FormGroup,AL_DE1Processing Processing_Flag,al_action Operator_Action,AL_OPERATORID UserID, UL_UserName FullName
, sum(isnull(OE_ErrorCount,0)) error_Count
from userlogin u,auditlog a left outer join operatorError o
on o.oe_batchname = al_functionname and o.oe_operatorid =AL_OPERATORID and o.oe_de1processingflag =al_de1processing and oe_datachangedto not like 'Other'
where al_operatorid = ul_userid and al_action in ('dataentry','hold') and
al_createdon > @PFromDate and al_Createdon <= @PToDate
group by al_formgroup,AL_DE1Processing,al_action,AL_OPERATO RID,UL_UserName
order by al_operatorid,al_formgroup,AL_ACTION
End
|