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 :
Microsoft Dynamics AX (Archived)

How to convert the SQL Query "Left Outer Join" into X++ query while using Insert_Recordset

(0) ShareShare
ReportReport
Posted on by 781

Hello Experts,

I've got an SQL query like below. I've to write an X++ Query for this and insert the result records in a Table. Here i can convert the SQL to X++ except the "Left Outer Join". In X++ we have "Outer Join" That too is not working with Insert_Recordset. Any suggestion would be helpful.

8203.Query.png

*This post is locked for comments

I have the same question (0)
  • Johnkrish Profile Picture
    781 on at

    Hi Crispin John Augustine,

    Thank you for the quick response. Actually i showed a part of the sql query in the image, but this SQL query having four part like this and everything as a same query with Multiple Joins and Union. So if i use the While Statement then it will be "performance issue" though we use RecordInsertList.  So can we have any other effective approach? without using While statement.

  • Johnkrish Profile Picture
    781 on at

    Hi Crispin John Augustine,

    Sorry for the delayed reply, Since i was working with other priorities i was unable to look into this. Now I've done this task with 'RecordInsertList' and by using AOT Query.Its working fine. Thank you for your valuable suggestions.

    One question: Can we implement Direct SQL statement execution in DAX with the given SQL Query. Since i used that before for one customization, it was working fine. So my Question is  

    # Is this Microsoft best practice? or

    # if it comes under MBP then any Performance issue will be there compared to our X++ converted ? or

    # we need to convert like what I've done now?  

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans