web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

How to Join AA and GL table data in SQL

(0) ShareShare
ReportReport
Posted on by 215

For a report I am working on, I need to see GL20000.DSCRIPTN with a query that is pulling info from AAG30000, AAG30001, and AAG30002.  What columns can I use to join these tables?

Thanks in advance for your help!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    26P2ER Profile Picture
    1,775 on at
    RE: How to Join AA and GL table data in SQL

    Hello Medardo:

    Mr. Saadi a true AA savant has some ideas here:-

    http://mahmoudsaadi.blogspot.com/2014/03/general-ledger-journals-with-analytical.html

    Best of luck

  • Med Profile Picture
    215 on at
    RE: How to Join AA and GL table data in SQL

    Thank you for the info.  I had reviewed this article prior to posting this question.  The article does not join the AA tables with the GL20000 table.

    I need the JE distribution references with the AA info.  The problem here is that the JE distribution reference is being captured on the GL tables and the users are not using the AA distribution reference in the JE.  So I am tasked with stitching these tables together at the distribution level.  Any other suggestions?

  • Verified answer
    26P2ER Profile Picture
    1,775 on at
    RE: How to Join AA and GL table data in SQL

    Hello, Med -

    How about the below

    For your joins?

    AAG30000.JRNENTRY         = GL20000.JRNENTRY      AND

    AAG30000.RCTRXSEQ        =    GL20000.RCTRXSEQ    AND
    AAG30000.aaGLHdrID         = AAG30001.aaGLHdrID   AND

    AAG30001.SEQNUMBER      =GL20000.SEQNUMBER   AND

    AAG30001.aaGLHdrID          =AAG30002.aaGLHdrID    AND

    AAG30001.aaGLDistID         =AAG30002.aaGLDistID

    Best of luck

  • Med Profile Picture
    215 on at
    RE: How to Join AA and GL table data in SQL

    Hi Ven, Thanks for the help!  Your post helped me figure out what I needed.  Thanks!

  • Community Member Profile Picture
    on at
    RE: How to Join AA and GL table data in SQL

    Hi Med - I'm trying to do the same thing.  Could you share your results?  Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans