Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL for GL trial balance

Status
Not open for further replies.

tzherukh

Programmer
Aug 15, 2008
1
0
0
US
Guys,

I have GP 9 database only, no front-end and is tased to pull balances on accounts for last closed months. Does somebody has a SQL or names of the tables/stored procedures involved?

Thanks a lot!

TZ
 
I use this to find account balances. I'm not sure if it will help. I use it to find where people coded to accounts that shouldn't have amounts in them, and are not inactive.

SELECT
Sum(debitamt)-Sum(crdtamnt) AS 'Total',
GL00100.ACTNUMBR_1, 'Account Segment1'
GL00100.ACTNUMBR_2, 'Account Segment2'
GL00100.ACTNUMBR_3, 'Account Segment3'
FROM
GL00100, GL20000
WHERE
GL00100.ACTINDX = GL20000.ACTINDX
AND ((GL20000.TRXDATE Between ? And ?))
GROUP BY
GL00100.ACTNUMBR_1,
GL00100.ACTNUMBR_2,
GL00100.ACTNUMBR_3,
GL00100.ACCTTYPE
HAVING
GL00100.ACCTTYPE=1
 
The period net activity, in summary, is stored in GL11110 for Open years, and GL11111 for Historical years.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top