G
Guest
Hi,
I'm having a problem running a type of query I've used many times before.
To set the stage, I have 2 tables:
tblIncidents - where the field "IncidentCode" is the primary key
tblCARs - where the field "CARNo" is the primary key
A relationship is set up between the two tables through identically named
"IncidentCode" fields. It is a one-to-many (tblIncidents to
tblCARs)relationship, with referential integrity and cascade updating of
related fields.
When I try to run the following query on tblCARs:
SELECT DISTINCT tblCARs.PersonRespCAR
FROM tblCARs
ORDER BY tblCARs.PersonRespCAR;
I get the following error message:
"The changes you requested to the table were not successful because they
would create duplicate values in the index, primary key, or relationship.
Change the data in the field or fields that contain duplication data, remove
the index, or redefine the index to permit duplicate entries and try again."
I'm not sure what changes to tables this message is refering to. As far as
I know I'm only running a query off the table. Any suggestions or help in
getting this relatively simply query to run would be greatly appreciated!
Thanks,
SM
I'm having a problem running a type of query I've used many times before.
To set the stage, I have 2 tables:
tblIncidents - where the field "IncidentCode" is the primary key
tblCARs - where the field "CARNo" is the primary key
A relationship is set up between the two tables through identically named
"IncidentCode" fields. It is a one-to-many (tblIncidents to
tblCARs)relationship, with referential integrity and cascade updating of
related fields.
When I try to run the following query on tblCARs:
SELECT DISTINCT tblCARs.PersonRespCAR
FROM tblCARs
ORDER BY tblCARs.PersonRespCAR;
I get the following error message:
"The changes you requested to the table were not successful because they
would create duplicate values in the index, primary key, or relationship.
Change the data in the field or fields that contain duplication data, remove
the index, or redefine the index to permit duplicate entries and try again."
I'm not sure what changes to tables this message is refering to. As far as
I know I'm only running a query off the table. Any suggestions or help in
getting this relatively simply query to run would be greatly appreciated!
Thanks,
SM