S
Scoop
I have a table with duplicate entries. I, obviously, want to remove the
duplicates so that my report does not have multiple entries of the same
data. I have read, and read, about the SELECT DISTINCT but cannot get the
query to ignore duplicate entries. Here is the SQL for the query:
SELECT DISTINCT Sample_Table.Number, Sample_Table.last_name,
Sample_Table.First_name, Sample_Table.Status, Sample_Table.Address,
Sample_Table.City, Sample_Table.State, Sample_Table.ZIP, Sample_Table.Race,
Sample_Table.Sex, Sample_Table.Age, Sample_Table.CompanyFinal,
Sample_Table.AddressFinal, Sample_Table.CityPreferred,
Sample_Table.StateFinal, Sample_Table.ZipFinal, Sample_Table.Leftovers,
FROM Sample_Table
WHERE (((Sample_Table.Number) In (SELECT [Number] FROM [Sample_Table] As Tmp
GROUP BY [Number] HAVING Count(*)>1 )))
ORDER BY Sample_Table.Number;
Why do I still get duplicates in this query? How can I get rid of the
duplicates so that the record only shows up once? Thank you for any ideas
you may have
duplicates so that my report does not have multiple entries of the same
data. I have read, and read, about the SELECT DISTINCT but cannot get the
query to ignore duplicate entries. Here is the SQL for the query:
SELECT DISTINCT Sample_Table.Number, Sample_Table.last_name,
Sample_Table.First_name, Sample_Table.Status, Sample_Table.Address,
Sample_Table.City, Sample_Table.State, Sample_Table.ZIP, Sample_Table.Race,
Sample_Table.Sex, Sample_Table.Age, Sample_Table.CompanyFinal,
Sample_Table.AddressFinal, Sample_Table.CityPreferred,
Sample_Table.StateFinal, Sample_Table.ZipFinal, Sample_Table.Leftovers,
FROM Sample_Table
WHERE (((Sample_Table.Number) In (SELECT [Number] FROM [Sample_Table] As Tmp
GROUP BY [Number] HAVING Count(*)>1 )))
ORDER BY Sample_Table.Number;
Why do I still get duplicates in this query? How can I get rid of the
duplicates so that the record only shows up once? Thank you for any ideas
you may have