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

Announcements

News and Announcements icon
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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans