Question on Join properties

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
1,822
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Looking at join properties there's 3 options

1. Only include rows where the joined fields from both tables are equal.
2. Include ALL records from 'Table1' and only those records from
'Table2' where the joined fields are equal.
3. Include ALL records from 'Table2' and only those records from
'Table1' where the joined fields are equal.

But what if you want to only include rows from 'Table1' where the joined fields from both tables are equal ?

All of the 3 options give two of each, one from each table.

Thanks, ABB
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
The reason that they mention both sides of the join is, that is how databases think about joins.
Type 1 above is an EQUI-JOIN: the default when you join 2 tables. You only see rows where the join (key) fields match in both tables.
Types 2 and 3 are OUTER JOINS: They let you detect mismatched data, e.g. Customers with no Orders. You will also see them described as LEFT and RIGHT joins (2 is LEFT, 3 is RIGHT), indicating the direction of the mismatch.

If you only want to see data from Table1 where both tables are equal, leave the join as Type 1, and only include fields from Table1 on the grid.

Denis
 
Upvote 0
Thanks Denis, that's often bugged me. I've have to print out your reply and stick it on the wall!

Regards, ABB
 
Upvote 0

Forum statistics

Threads
1,203,181
Messages
6,053,964
Members
444,695
Latest member
asiaciara

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top