You can start creating your query with the following company tables, which
will provide you the following:
GL00100 - Account Master
GL20000 - Open Year Transaction Details
GL30000 - Historical Year transaction Details
GL00105 - Account number string, an alternative from conbining account
segments in GL00100
The following script is a very simple SQL query that is functionally TB
Summary as at run date (one open fiscal year):
select GL20000.actindx as [ACCOUNT INDEX],GL00105.actnumst as [ACCOUNT],
sum(GL20000.DEBITAMT) as [DEBIT AMOUNT], sum(GL20000.CRDTAMNT) as [CREDIT
AMOUNT]
from GL20000
inner join GL00105
on GL20000.actindx = GL00105.actindx
group by GL20000.ACTINDX, GL00105.actnumst
ORDER BY GL20000.ACTINDX
You can put more fields and apply additional restrictions to meet your
specific requirements.
Hope this helps!
Cheers,
Dennis Araullo, MACS
Microsoft Certified Technology Specialist GP,CRM,AX
MCITP Installation and Configuration AX 2009
MCITP Database Administrator SQL 2008
Citrix Certified Enterprise Administrator
Frank Hamelly
MCP-GP, MCT, MVP
East Coast Dynamics
www.eastcoast-dynamics.com
get your gptip42today at www.gp2themax.blogspot.com
Those dates wouldn't give you a trail balance as they exclude the
BBF. I would use FRx for this function.
Jim
Do you need the report in Excel? What requires a SQL statement. There are
easier ways to export the trial balance numbers to Excel.
Let us know, we can help.
Kind regards,
Leslie
Here is a summary level query
Here is another one. Replace Year and Month
select b.ACTNUMST,SUM(a.PERDBLNC) from GL10110 a
LEFT OUTER JOIN GL00105 b on a.ACTINDX = b.ACTINDX
where YEAR1 = 2014 and PERIODID < 8
GROUP BY b.ACTNUMST
Jim