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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

AOT query doesn't support full outer join

(0) ShareShare
ReportReport
Posted on by 133

Hi all,

I was working on a form which has AOT query as a datasource. Query has some data sources like,

PurchReqTable

     PurchReqLine

          PurchLine

               PurchTable

               VendPackingSlipTrans

                    VendPackingSlipJour

all tables are joined with outer join. As per my knowledge, this outer join is works as left outer join(correct me if I'm wrong).

So the requirement is, I have to show all the data in all these tables(that's why I used outer join). But the data from purchTable are not coming properly- that means POs that are not created from Purchase requisitions(created separately), are not available in the report. I wrote same query in SQL using left outer join, and it shows same data as the report. But when I use full outer join in SQL, it shows the data that I want in my report. 

So what should I change/add in my AOT query to make it work like full outer join?

pastedimage1627887752657v1.png

I have the same question (0)
  • Nya Profile Picture
    29,060 on at

    Hi,

    Would you please specify which application you're using in Dynamics?

    I'll move it to the proper forum for more help.

  • Bhagyashree Dave Profile Picture
    133 on at

    it's dynamics d365 f&o

  • WillWU Profile Picture
    22,361 on at

    Hi Bhagyashree,

    You can't do that in one query,  you could try to write two while loops for these two different conditions.

    And you can use notexists join to get the data not from PR.

    while select PO

         notexists join PR

              where PO.PurchId== PR.PurchId

  • Bhagyashree Dave Profile Picture
    133 on at

    Hi, thanks for your reply.

    but there is no code in this report, just the query.

    So I can't use while select.

    Also I need data of all PR, all PO and all the Product Receipts. So I can't use not exists join on PR also.

    hope you understand what I'm saying.

  • WillWU Profile Picture
    22,361 on at

    Hi Bhagyashree,

    I think you should develop a new reports for that requirement instead of modifying the original report. You could create a query by code. How about using Union query?

  • Bhagyashree Dave Profile Picture
    133 on at

    Thanks for your quick reply.

    So, you mean to say I can't do anything with this existing query, I have to write x++ code for this requirement. Won't it make the report slower?

  • Verified answer
    WillWU Profile Picture
    22,361 on at

    Hi Bhagyashree,

    As far as I know, yes, and you can try to create a new union query based on the existing query.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans