E
esn
I'm trying to create a make-table query that will group records by two
fields. The fields, named "Left" and "Right," both contain 4-digit
identification numbers, and each combination of the two fields should
identify a unique individual. Unfortunately, data entry/recording
errors are pretty common in these fields.
The point of the query is to assign a unique, single-field ID to each
individual, using the primary key from the table created by this
query. In a perfect world, I could just group records by "Left" and
"Right," add the results to a temporary table, and use the PK from
that table as an ID. But as I mentioned above, the data is not
exactly perfect.
I have created queries to find individuals with similar Left and Right
codes, but I can't think of a good way to group all these records
together. Here's and input example:
RecordID Left Right
1 1001 1002
2 1001 1002
3 1002 1001
4 1003 1004
5 1005 1006
6 1005 1009
7 1005 1006
What I'm trying to do is create some field, based on "Left" and
"Right," that I could use in a group by statement to return three rows
from the table above, since there are probably 3 individuals
represented there. (The first three records are probably all the same
individual, as are the last three records). Not even sure if this
would be possible, since in different cases things are grouped based
on different criteria, but I thought I would put it out there and see
what people think.
fields. The fields, named "Left" and "Right," both contain 4-digit
identification numbers, and each combination of the two fields should
identify a unique individual. Unfortunately, data entry/recording
errors are pretty common in these fields.
The point of the query is to assign a unique, single-field ID to each
individual, using the primary key from the table created by this
query. In a perfect world, I could just group records by "Left" and
"Right," add the results to a temporary table, and use the PK from
that table as an ID. But as I mentioned above, the data is not
exactly perfect.
I have created queries to find individuals with similar Left and Right
codes, but I can't think of a good way to group all these records
together. Here's and input example:
RecordID Left Right
1 1001 1002
2 1001 1002
3 1002 1001
4 1003 1004
5 1005 1006
6 1005 1009
7 1005 1006
What I'm trying to do is create some field, based on "Left" and
"Right," that I could use in a group by statement to return three rows
from the table above, since there are probably 3 individuals
represented there. (The first three records are probably all the same
individual, as are the last three records). Not even sure if this
would be possible, since in different cases things are grouped based
on different criteria, but I thought I would put it out there and see
what people think.