G Guest Jan 11, 2006 #1 Other than creating a "Find Duplicates Query" is there a simple way to find dups in a query.. Something like: Criteria = "no dups"
Other than creating a "Find Duplicates Query" is there a simple way to find dups in a query.. Something like: Criteria = "no dups"
M Michel Walsh Jan 11, 2006 #2 Hi, You can make GROUP BY with all the fields defining what you mean to consider in "dup", and add a HAVING clause on the count: SELECT f1, f2, LAST(f3) FROM myTable GROUP BY f1, f2 HAVING COUNT(*) <> 1 here, from fields f1, f2, and f3, only the first two are important, ie, you want to get records that have the couple (f1, f2) have duplicated values. Hoping it may help, Vanderghast, Access MVP
Hi, You can make GROUP BY with all the fields defining what you mean to consider in "dup", and add a HAVING clause on the count: SELECT f1, f2, LAST(f3) FROM myTable GROUP BY f1, f2 HAVING COUNT(*) <> 1 here, from fields f1, f2, and f3, only the first two are important, ie, you want to get records that have the couple (f1, f2) have duplicated values. Hoping it may help, Vanderghast, Access MVP