Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

left join in entities

(0) ShareShare
ReportReport
Posted on by 1,273
Hi,

I have a table with 29 records, this table has a filed called PostalAddress(RecId) which has a relation with logisticsPostalAddress.Location
As you can see sometimes the field is filled and sometimes not.
Total # of records is 29 (only 4 records has postal address filled)
 
 
I created an entity for this table -- with outerJoin LogisticsPostalAddress and then inner join with Logisitics Location
It started returning 4 records to me.
However, when I made logisticsPostalAddress outer join with logisticsPostalAddress, it started return 29 records.

my question is, we all know that outer join in entity is a left join, so why when i made inner join with logsiticsLocation it started returning only 4 records and not 29? I'm assuming the outer join with logistics postal address returns anything in the main table the doesn't have an address. And since logsiticsLocation relation is with LogisticsPostalAddres, why did the inner join return 4 records instead of 29?
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 6,619 Super User 2024 Season 2 on at
    left join in entities
    Hi ,
     
    The inner join between logisticsLocation and LogisticsPostalAddress is return only the records that have that location(RecID) on logisticsLocation table, so it is expected to return only the 4 records.
     
     
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,488 Most Valuable Professional on at
    left join in entities
    Inner join returns records for which the relation has records on both sides. As you showed on your screenshot, there are only four records in PostalAddress that have a relation to LogisticsPostalAddress and these are the records you get by inner-joining the tables.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,488 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans