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 :
Finance | Project Operations, Human Resources, ...
Answered

what is different betwean joins and Exists joins in the D365FO

(0) ShareShare
ReportReport
Posted on by 130

Hi, 

i am new in Ax so i wrote small jobs normal joins and Exists joins both output same 10 records shows.

my doubt when to use joins?

when to use Exists joins?  also both joins same concept

HCMIqamaDetails iqamaDetails;
HCMIqamaProcess iqamaProcess; 

while select firstOnly10 iqamaDetails
join iqamaProcess 
where iqamaProcess.RecId == iqamaDetails.IqamaProcessRecId
{

info(strFmt("%1",iqamaDetails.IqamaProcessRecId));

}

HCMIqamaDetails iqamaDetails;
HCMIqamaProcess iqamaProcess; 

while select firstOnly10 iqamaDetails
Exists join iqamaProcess 
where iqamaProcess.RecId == iqamaDetails.IqamaProcessRecId
{

info(strFmt("%1",iqamaDetails.IqamaProcessRecId));

}

thanks

I have the same question (0)
  • Verified answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    Exist join will not return you the joined table buffer (iqamaprocess)

    Normal join will.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,146 Super User 2025 Season 2 on at

    Hi WayToAX,

    The main difference between these option is that the normal join will also fetch the columns with all values from the SQL server whereas the exists join will only check if there is a record linked. The exists join will not fetch data from the joined table. The result: performance. If you don't need the field values of the joined table, then it is recommended to use exists join.

  • WaytoAx Profile Picture
    130 on at

    many thanks quickly replay Nikolaos,

    my doubt exist joins not return it is okay,  innor join & Exist joins both result same  

  • WaytoAx Profile Picture
    130 on at

    Many thanks Andre Sir.

  • Verified answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    You can try to print something from iqamaprocess (the joined table) to your infolog to notice the difference.

  • WaytoAx Profile Picture
    130 on at

    Info Message (12:47:00 pm) joins : 5637161092

    Info Message (12:47:00 pm) exists joins : 5637161092

    Info Message (12:47:00 pm) joins : 5637161117

    Info Message (12:47:00 pm) exists joins : 5637161117

    Info Message (12:47:00 pm) joins : 5637161116

    Info Message (12:47:00 pm) exists joins : 5637161116

    Info Message (12:47:00 pm) joins : 5637161095

    Info Message (12:47:00 pm) exists joins : 5637161095

    Info Message (12:47:00 pm) joins : 5637161093

    Info Message (12:47:00 pm) exists joins : 5637161093

    Info Message (12:47:00 pm) joins : 5637161098

    Info Message (12:47:00 pm) exists joins : 5637161098

    Info Message (12:47:00 pm) joins : 5637161099

    Info Message (12:47:00 pm) exists joins : 5637161099

    Info Message (12:47:00 pm) joins : 5637161115

    Info Message (12:47:00 pm) exists joins : 5637161115

    Info Message (12:47:00 pm) joins : 5637161100

    Info Message (12:47:00 pm) exists joins : 5637161100

    Info Message (12:47:00 pm) joins : 5637161101

    Info Message (12:47:00 pm) exists joins : 5637161101

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans