Equals:
This option will exclude any records that don't exist in both tables from the results. A record must exist in both the table you are linking and the table you are linking it to for it to be included in the results.
Left Outer:
Left Outer:
This option will include all of the records from the first table and all matching records from the second table.
For example:
For example:
Let's take the Customers and their addresses. You can have a customer without entering an address, but you cannot enter an address without entering a customer.
So, if I use an Equals join between the Customer Master and the Customer Address Master, I am only going to get the customers that do have addresses.
So, if I use an Equals join between the Customer Master and the Customer Address Master, I am only going to get the customers that do have addresses.
If I use a Left Outer join, I will get all the customers and the address if they have one.
Table Order in the Link:
The other thing to take into consideration with this is the order you link the tables into the SmartList Builder setup.
If I add the Customer Master table and then link the Customer Address Master table to it using a Left Outer join, I will get all the customers and then any addresses the customers have saved.
If I add the Customer Master table and then link the Customer Address Master table to it using a Left Outer join, I will get all the customers and then any addresses the customers have saved.
If I add the Customer Address Master table and then link the Customer Master table to it using a Left Outer join, I will get all the addresses and any customer information for those addresses. I will not get the customers that don't have addresses.
If I add the Customer Master table and then link the Customer Address Master table to it using an Equals join, I will get only the customers that have addresses saved and those addresses.
If I add the Customer Address Master table and then link the Customer Master table to it using an Equals join, I will get all of the addresses and any customer information for those addresses. This is because you cannot have a address record without the customer record being there as well. If a customer doesn't have an address, they will not be returned as they aren't in both tables.
Hopefully this helps you think about how you might link the tables in your setup. If you are in doubt, try it a couple of different ways and see if you get the results you would expect. You can always change it.
Interested in learning more about SmartList Builder? Email sales@eonesolutions.com for more information!
No comments:
Post a Comment