There are many informative threads on finding duplicates.
So many that I don't know whether my particular issue was
in there--I gave up looking after reading about ten threads.
What I have is a huge collection of accounting entries. Account number and Facility together are supposed to be unique, but they are not.
However, I don't want to just eliminate the duplicates--I need to move them to another table.
I find it easy to do except for one detail: if the table
contains
A A B C D D D E F G
then I need the results to be
Dupes: A D D
Good: A B C D E F G
instead of
Dupes: A A D D D
Good: B C E F G
The latter is easy. I could use DISTINCT to shrink Dupes, and then merge it back into Good, but then I would lose the extras that I want to keep in Dupes.
I am very much a newbie to SQL--and it doesn't help that Jet SQL is *not* the language called SQL in my reference books.
So many that I don't know whether my particular issue was
in there--I gave up looking after reading about ten threads.
What I have is a huge collection of accounting entries. Account number and Facility together are supposed to be unique, but they are not.
However, I don't want to just eliminate the duplicates--I need to move them to another table.
I find it easy to do except for one detail: if the table
contains
A A B C D D D E F G
then I need the results to be
Dupes: A D D
Good: A B C D E F G
instead of
Dupes: A A D D D
Good: B C E F G
The latter is easy. I could use DISTINCT to shrink Dupes, and then merge it back into Good, but then I would lose the extras that I want to keep in Dupes.
I am very much a newbie to SQL--and it doesn't help that Jet SQL is *not* the language called SQL in my reference books.