I have three files A, B, C in my join query. Test is between A - B, B - C. The type is 2 (match records to primary file). When I run the query, it is returning duplicates. What am I doing wrong?
Software/Hardware used:
ASKED:
December 30, 2009 1:27 PM
UPDATED:
December 31, 2009 3:52 PM
CharlieBrowne has an appropriate example. To get some clear visual evidence with SQL, add a couple of additional fields — RRN(A) and RRN(B) — to the select list. The cause of duplicates should be clearer when you can see which records contribute the values.
Tom
When joining more than 2 files, I will often use multiple queries especially when duplicate records will be returned. For your example I would write 1 query to join A and B creating file D, then a second query joining D and C. With this exrta step, it is often easier to see where your duplicate records are coming from.