|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
finding duplicates of muliple fields combinedI want to put a constraint on a table where a combination of fields are
unique, but there are already duplicates. For instance, select distinct F1, F2, F3 from tbl = 405 records, but there are 406 records in the entire table. F1 is a unique identifier by the way. How can I find that duplicate? Try:
Select F1, F2, F3 From tbl Group By F1, F2, F3 Having Count(*) > 1 Thomas Show quote "et" <eagletender2***@yahoo.com> wrote in message news:uN$RTnAhFHA.3616@TK2MSFTNGP12.phx.gbl... >I want to put a constraint on a table where a combination of fields are unique, >but there are already duplicates. > > For instance, > select distinct F1, F2, F3 from tbl = 405 records, but there are 406 > records in the > entire table. F1 is a unique identifier by the way. > > How can I find that duplicate? > > > |
|||||||||||||||||||||||