>> Hi I have a table which has the fields PolicyHolder (Primary Key) and
>> PolicyNumber plus other fields. I need to allow the same
>> PolicyHolders name to be used but only to one policyNumber.
>> But I also need the policy number to be able to have more that one
>> name attached to it i.e. Smith Policy number 1234, Jones Policy
>> number 1234, White Policy number 1234 but never the same name twice
>> with the same policy number.
> Hi I am really stuck with this one if I change the primary key on the
> table
It sounds to me as though you should be walking right away from the PC
and thinking hard about your tables design. From what we have already,
you seem to need three tables instead of this one:
People(*CustomerID, name, address, etc)
Policies(*PolicyNumber, PolicyType, FinalValue, MaturityDate, etc)
Allocations(*CustomerID, *PolicyNumber, DateSigned, VerifiedBy, etc)
The two stars in the Allocations table represents ONE primary key made
up of the TWO fields (each of which are foreign keys referencing their
own tables).
FWIW, this is a straightforward many-to-many relationship.
Hope that helps
Tim F
dbl - 28 Jul 2005 19:45 GMT
Thanks Tim it looks like I will have to start over.
Bob
>>> Hi I have a table which has the fields PolicyHolder (Primary Key) and
>>> PolicyNumber plus other fields. I need to allow the same
[quoted text clipped - 27 lines]
>
> Tim F