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

  • Johnkrish Profile Picture
    781 on at
    RE: How to convert the SQL Query "Left Outer Join" into X++ query while using Insert_Recordset

    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?  

  • Johnkrish Profile Picture
    781 on at
    RE: How to convert the SQL Query "Left Outer Join" into X++ query while using Insert_Recordset

    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.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Kempeth Profile Picture

Kempeth 4

#1
Andy Adamak Profile Picture

Andy Adamak 4

#1
Community Member Profile Picture

Community Member 4

Featured topics

Product updates

Dynamics 365 release plans