R
Ric Passey
Dear All,
I inherited a large purchasing database when I started a new job. Whoever
wrote it had not been to the database school that I went to so they had used
some odd things as primary key. There are alot of problems but the biggest
is that the supplier table has used the supplier name as the PK. Also
somewhat confusingly there is no relationship setup (I don't know how it is
held together). This means that supplier name cannot be changed without
breaking the relationship between the suppliers and the order. So if a
supplier changes its name all orders made by that supplier become blank.
The only work around is to make a new company and start again, which makes
life very hard for the guys doing the ordering if they need to check back at
a later date.
The ideal solution would eb to setup an autonumber as a pK and add a
relationship to an interger field in the related table. Obviously this is
where things get a little complicated. With 800 suppliers and 25000 orders
manually doing this would be a little time consuming. If anyone has an
automated approach I would be most grateful.
So is there some natty wizard someone has written or a clever piece of code
if so let me know.
Thanks,
Ric Passey
I inherited a large purchasing database when I started a new job. Whoever
wrote it had not been to the database school that I went to so they had used
some odd things as primary key. There are alot of problems but the biggest
is that the supplier table has used the supplier name as the PK. Also
somewhat confusingly there is no relationship setup (I don't know how it is
held together). This means that supplier name cannot be changed without
breaking the relationship between the suppliers and the order. So if a
supplier changes its name all orders made by that supplier become blank.
The only work around is to make a new company and start again, which makes
life very hard for the guys doing the ordering if they need to check back at
a later date.
The ideal solution would eb to setup an autonumber as a pK and add a
relationship to an interger field in the related table. Obviously this is
where things get a little complicated. With 800 suppliers and 25000 orders
manually doing this would be a little time consuming. If anyone has an
automated approach I would be most grateful.
So is there some natty wizard someone has written or a clever piece of code
if so let me know.
Thanks,
Ric Passey