A
Alisa
I have a table where we need to select unique records based on three fields
(i.e., those three fields are acting as a primary key). They are not true
duplicates because those are the only three fields that match. In any case,
I have all of the record pairs in a separate table, and I need to mark each
record of the pair as kept or removed based on values in other fields in the
table. For instance, if field5 equals yes for both duplicate records in the
pair, then I want to keep the record with the higher value in field7, but if
field5 equals yes for one of the pair and no for the other, I want to keep
the one that has a yes, etc.etc.
My question is, how does access "see" a self-join? When I write a query like:
update Table.Field1 if Table.Field2< Table_1.Field2,
it only updates some of the records that fit the criteria. Even if I then
run a second query to update Table_1.Field1 if Table_1.Field2 < Table.Field2,
it still does not capture all of the records that it should. I can't seem to
find any info on how self joins work exactly, any suggestions would be
appreciated.
(i.e., those three fields are acting as a primary key). They are not true
duplicates because those are the only three fields that match. In any case,
I have all of the record pairs in a separate table, and I need to mark each
record of the pair as kept or removed based on values in other fields in the
table. For instance, if field5 equals yes for both duplicate records in the
pair, then I want to keep the record with the higher value in field7, but if
field5 equals yes for one of the pair and no for the other, I want to keep
the one that has a yes, etc.etc.
My question is, how does access "see" a self-join? When I write a query like:
update Table.Field1 if Table.Field2< Table_1.Field2,
it only updates some of the records that fit the criteria. Even if I then
run a second query to update Table_1.Field1 if Table_1.Field2 < Table.Field2,
it still does not capture all of the records that it should. I can't seem to
find any info on how self joins work exactly, any suggestions would be
appreciated.