J
Jim
Hi all,
Here's a mystery I need to find a work-around for. Maybe someone has a
simple solution.
As part of a de-duping process, I'm finding duplicates through a simple
aggreate (GROUP BY) query. For instance, I'm grouping a mail list (MAIL) on
last name, first name, and zip, and returning the max of an id field (pkey).
I them make a temporary table out (TEMP) of the results (where the count of
the group is more than 1).
Now, I want to find *all* the records in each duplicate set so I can process
them further. So, I join TEMP back onto MAIL using last name, first name,
and zip (not, of course, the ID)
Say there are 5 last names, first names, and zips identical, and so we have
a group of five, with one of them having a max id (say 200). The max id
record becomes a row in the TEMP table. Now if I inner join TEMP back onto
to MAIL on the name and zip fields of id#200, I should get back 5 records,
including 200. This is what I want and it indeed works unless...
Unless one of the fields contains a null. Say in the original aggregate
query, the group of five are grouped on a null zip along with first name and
last name. Although Access will group by null, it won't include the null
values in the inner join.
So, I have a bunch of sets of duplicates, represented by the max id of the
group, but can't find the other records in the group if a field is null
because Access won't join on it. (It's as if Access is willing to identify
"a" as null and "b" as null, but it refuses to say "a=b".)
Any ideas?
Thanks much!
Here's a mystery I need to find a work-around for. Maybe someone has a
simple solution.
As part of a de-duping process, I'm finding duplicates through a simple
aggreate (GROUP BY) query. For instance, I'm grouping a mail list (MAIL) on
last name, first name, and zip, and returning the max of an id field (pkey).
I them make a temporary table out (TEMP) of the results (where the count of
the group is more than 1).
Now, I want to find *all* the records in each duplicate set so I can process
them further. So, I join TEMP back onto MAIL using last name, first name,
and zip (not, of course, the ID)
Say there are 5 last names, first names, and zips identical, and so we have
a group of five, with one of them having a max id (say 200). The max id
record becomes a row in the TEMP table. Now if I inner join TEMP back onto
to MAIL on the name and zip fields of id#200, I should get back 5 records,
including 200. This is what I want and it indeed works unless...
Unless one of the fields contains a null. Say in the original aggregate
query, the group of five are grouped on a null zip along with first name and
last name. Although Access will group by null, it won't include the null
values in the inner join.
So, I have a bunch of sets of duplicates, represented by the max id of the
group, but can't find the other records in the group if a field is null
because Access won't join on it. (It's as if Access is willing to identify
"a" as null and "b" as null, but it refuses to say "a=b".)
Any ideas?
Thanks much!