Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

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

  • 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.

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,632 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,528 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans