Comparing for Duplicate rows

R

rsue

My "imported or linked" database has duplicate rows. The
(columns) fields I need to extract only need one row for
each entry in the invoice field. Please tell me where to
find out (a) how to compare one table to another, and if
possible how to auto highlite (or select) which columns
are different information (90 columns).
(b) know if there is a module or selection in program to
remove all but one row in a field that has dups.
Thanks for your help. I'm willing to buy a book, etc.
anything that will help me understand comparisons. I did
not create the imported db.
sue
 
J

John Nurick

Hi Sue,

If you just want to retrieve single rows from tables that have
duplicates, use constructions like

SELECT DISTINCT
and
SELECT TOP 1

To identify duplicate rows, use the Find Duplicates query wizard, which
lets you specify which columns to compare. If necessary you can edit the
SQL produced by the wizard to fine-tune it.

To compare tables, you can create a query that joins them on the
relevant fields (to see what records they have in common); use the Find
Unmatched query wizard; or various other kinds of queries.

There's a very good book on using SQL to extract and compare data. From
memory, the authors are Hernandez and Viescas and the title is something
like SQL for Mere Mortals (my copy's in the office and I'm at home).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top