This query identifies the number of unique transactions in the appropriate tables (Open or Historical), and reveals the Number of Purchasing Transactions processed on a given day.
declare @Date as DATETIME
SET @Date = '04/12/2017'
/*Payables Transactions*/
Select SUM(PM_Trxs) PM_Trxs from (
Select COUNT(vchrnmbr) PM_Trxs FROM PM20000 where DOCDATE = @Date
Union All
Select COUNT(vchrnmbr) PM_Trxs FROM PM30200 where DOCDATE = @Date) a
No comments:
Post a Comment