DECLARE @DSTN varchar (30)
DECLARE @DST varchar (30)
SET @DSTN = (SELECT Districtname FROM Store st (nolock) inner join District DS on ds.DistrictCode = st.DistrictCode WHERE StoreType = 1)
SET @DST = (SELECT name FROM Store st (nolock) inner join District DS on ds.DistrictCode = st.DistrictCode WHERE StoreType = 1)
Select @DST as ‘Tienda’, @DSTN as ‘Distrito’, getdate() as ‘Fecha’,trandate,sum(case when pdbupd = 1 then 1 else 0 end) PDB1,sum(case when pdbupd = 0 then 1 else 0 end) PDB0 from tranfile
Where Trandate = convert(date,getdate())
Group By Trandate Having Count(*) > 15
–Select trandate,sum(case when pdbupd = 0 then 1 else 0 end) PDB0 from tranfile (NoLock) Where trandate = convert(date,getdate()) Group By Trandate Having Count ( * ) > 15
Select trandate,sum(case when if002 = 0 then 1 else 0 end) if002 from tranfile_sale_queue (NoLock)
Where trandate = convert(date,getdate())
Group By Trandate Having Count ( * ) > 15
–Select Top 1 @@servername as ‘servername’,* from Systemlog (NoLock) where Logdate = Convert(date,getdate()) and progname = ‘usp_OutboundIntegrationStageSales’ and DATEDIFF(mi,LogTime,current_timestamp) <= 60 Order by AutoSequence desc
–OutBoundIntegrationTransactions – Reiniciar Datapush
–SELECT ‘OutBound 002’, COUNT(*) FROM OutboundIntegrationTransactions WHERE WebServiceTypeCode = ‘002’ AND Payload LIKE CONCAT(‘%’, FORMAT(GETDATE(), ‘yyyy-MM-dd’), ‘%’)
SELECT ‘OutBound 002’, COUNT(*) FROM OutboundIntegrationTransactions WHERE WebServiceTypeCode = ‘002’ AND Payload LIKE CONCAT(‘%’, FORMAT(GETDATE(), ‘yyyy-MM-dd’), ‘%’)
GROUP BY WebServiceTypeCode HAVING COUNT(*) > 5;
select @DST as ‘Tienda’, @DSTN as ‘Distrito’, getdate() as ‘Fecha’, progstarttim, eopstatus, acctstatus, currentdate, currptdate, progname from acctperiod with (nolock)
where eopstatus=0
and acctstatus=’C’
–select @DST as ‘Tienda’, @DSTN as ‘Distrito’, getdate() as ‘Fecha’, progstarttim, eopstatus, acctstatus, currentdate, currptdate, progname from acctperiod with (nolock)
–where eopstatus=3
–and acctstatus=’C’
–select @DST as ‘Tienda’, @DSTN as ‘Distrito’, getdate() as ‘Fecha’, progstarttim, eopstatus, acctstatus, currentdate, currptdate, progname from acctperiod with (nolock)
–where eopstatus=0
–and acctstatus=’O’
–select @DST as ‘Tienda’, @DSTN as ‘Distrito’, getdate() as ‘Fecha’, progstarttim, eopstatus, acctstatus, currentdate, currptdate, progname from acctperiod with (nolock)
–where eopstatus=1
–and acctstatus=’