Login

Welcome to software24x7

Be part of the community and join us today!

Determine GP Lines Per Day

The queries identify the number of unique transactions and the number of lines in the table. Dividing one by the other will reveal the average lines per transaction.  

This query reveals the Number of General Ledger Journal Entries on a given day and the number of overall lines.

DECLARE @Date as DATETIME
SET @Date = '04/12/2017'
 
/*Journal Entries*/
select sum(a.Journal_Entries) GL_Transactions from (
select count(c.GL_Transactions) Journal_Entries from (Select COUNT(jrnentry) GL_Transactions FROM GL20000 where TRXDATE = @Date group by JRNENTRY) c
Union All
select count(c.GL_Transactions) Journal_Entries from (Select COUNT(jrnentry) GL_Transactions FROM GL30000 where TRXDATE = @Date group by JRNENTRY) c ) a
/*GL Transaction Lines*/
select SUM(a.GL_Trx_Lines) GL_Trx_Lines from (
Select count(JRNENTRY) GL_Trx_Lines FROM GL20000 where TRXDATE = @Date group by TRXDATE
Union All

Select count(JRNENTRY) GL_Trx_Lines FROM GL30000 where TRXDATE = @Date group by TRXDATE) a

Posted in General Ledger on August 26 at 4:09

Replies (0)