G/L Balancing Queries
Jump to navigation
Jump to search
Quick Balance Query
select session_no, sum(trx_amount) from glttrx where trans_type<>'R' group by session_no having sum(trx_amount)<>0
Quick Verify Income Statement vs. Balance Sheet Total
select 'BAL_SHT',sum(gt.trx_amount) amount from glttrx gt inner join gltacct ga on ga.gl_account=gt.gl_account where trx_date <= :end_date and ga.account_type='B' union select 'INC_STM',sum(gt.trx_amount) amount from glttrx gt inner join gltacct ga on ga.gl_account=gt.gl_account where trx_date BETWEEN :Yr_Beg_Date and :end_date and ga.account_type='I'
G/L Before Year End entered after Closing Year
select gl_account,trx_date,trx_amount,description_1,description_2,session_no,trans_no,last_change_datetime,last_change_user from glttrx where trx_date <=(select max(trx_date) from glttrx where trans_type='R') and session_no> (select max(session_no) from glttrx where trans_type='R')