Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

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

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
    Johnkrish 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
    Johnkrish 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans