InvcDtl & InvcMisc to TranGLC BAQ

I’m trying to connect both InvcDtl & InvcMisc to TranGLC. If I do this in a single top level query, I get duplicate lines whenever an invoice has both detail lines & misc. charges.

So I figure the best way to get this done is to have a top level query and an Inner Sub Query. But I don’t know how to connect both queries together and then bring the sub query fields to the top level one. Can anyone give me some tips?

Any help appreciated. Thanks.

Not sure if I can help, but can you show the link you are using with TranGLC? In general linking the GL tables is a giant headache to be avoided if possible. What do you need the TranGLC table for?

You have to filter on the RelatedToFile