Integration event counts : In Process , Processed , Failure

Integration event counts : In Process , Processed , Failure

Environment : 

iVend 6.6 7989 with SAP B1 9.2


Queries : 

There are below queries ,used to find the In process, Processed  & Failure from iVend to SAPB1.


A) Summary 

Select  'Processing Records' Status,COUNT(*) 'Events Count' from RepIntegrationLog(nolock)
where Flag=0 and ( Status=0 or status is null)   and ApplicationKey='1'
Union
select  'Processed Records',COUNT(*) 'Events Count'from RepIntegrationLog(nolock)
where Flag=1    and ApplicationKey='1'
union
select  'Failed Records',COUNT(*)  'Events Count'from RepIntegrationLog (nolock)
where Flag=0 and Status=1  and ApplicationKey='1'
 

B) Details :

Select   a.SourceType, b.tablename,COUNT( *) 'Processing Events Count'
from RepIntegrationLog a(nolock)
left outer join RepObjectMapDB b(nolock)
on  a.SourceType=b.ObjectID
where a.Flag=0 and ( a.Status=0 or a.status is null) 
group by   a.SourceType, b.tablename
Order by  'Processing Events Count'   desc

Select   SourceType, b.tablename,COUNT(*) 'Failure Events Count'
from RepIntegrationLog a(nolock)
left outer join RepObjectMapDB b(nolock)
on  a.SourceType=b.ObjectID
where   Flag=0
and status=1
group by   SourceType, b.tablename
Order by  'Failure Events Count'   desc