I have 3 tables. They are inner joined. When I choose to select from all three tables I get a cartesian product.
I've used distinct and I've tried cross apply with top 1. Top 1 brings back the right amount of records but it repeats the fields used in that select top N.
Basic question. Can you select from 3 different tables and avoid a cartesian result? I can have all three tables joined and with distinct I can get records from two of the tables without a cartesian. It is when I choose to select from a third is where the cartesian appears.
If this is possible, what other tsql commands/constructs should I be experimenting with? http://imageshack.us/f/255/50353790.png/
I've used distinct and I've tried cross apply with top 1. Top 1 brings back the right amount of records but it repeats the fields used in that select top N.
Basic question. Can you select from 3 different tables and avoid a cartesian result? I can have all three tables joined and with distinct I can get records from two of the tables without a cartesian. It is when I choose to select from a third is where the cartesian appears.
If this is possible, what other tsql commands/constructs should I be experimenting with? http://imageshack.us/f/255/50353790.png/