I had some temporary
data entry operators inputing to a new database with some interesting
results. If a client is readmitted they would enter a new client record
and append either a '2' or a '?' to the last name, i.e., Dave Ebert, Dave
Ebert2, Dave Ebert?
The client record is
the top level of a pyramid structure. Below the client is the admission
record (many-to-one), and all records pertaining to the admission refer to the
admission record's PK.
I want to assign the
admission record's PK to the FK records, but transfer the admission record to
the first client record. No problem as I'm only talking about 60 or so
records.
However, the client
ID is used as a reference in most of the detail tables (assessments, services,
outcomes, etc.) potentially 18 tables in all. Reassigning those client
numbers involves finding out if a record by a given client number exists, and if
so to update it to the correct ID. This may need to be done for up to two
spurious ID numbers.
I can to a series of
updates to revise the ID number, but how would I do this aside from picking
through the candidate tables one at a time?
I'd appreciate any
pointers.
tia
Dave
Ebert
Dave
Ebert2
Dave
Ebert?
Huckleberry
House
