Thursday, October 30, 2014

Payables Transaction Analysis - Unique Purchasing Transactions per day

Recently I answered a forum post by a user who wanted to know the number of transactions by module entered in a given day.  I authored a series of queries which allow a user to input a date and execute the query.

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