J
Jason
I have been asked to take our current database table and break it into as
many as three different tables. The catch is that they will have
parent-to-chld relationships and I need to delete some duplicate entries in
the first table and make sure that the linked records in the second table
link to the single parent.
I provide technical support for a plastic fittings/valves/irrigation/etc
company and we track each call with the customer's contact information and
the reason for the call. All of this is collected in one table, TSContacts.
We have almost a year worth of entries, roughly 10,000 records. The problem
is that we recieve calls from the same contacts many times, so their
information gets entered over and over again. Additionally, some issues
cannot be addressed in the one call and several calls or transactions may
take place before the issue is resolved.
ContactID Name PhoneNumber Product Problem Comments
10025 John Doe 123-555-1234 Drip broken timer
malfunction
10026 John Doe 123-555-1234 box broken side of
box cracked
10027 John Doe 123-555-1234 Valve broken valve
leak at thread
10028 John Doe 123-555-1234 Valve broken more of
same valve 10029 John Doe 123-555-1234 Valve broken
more of same valve
What we would like to do with this data is make the contact info the parent
to the call info and make the call info parent to the comments (to track
progress and a date field would be added). Each Contact could have several
calls linked to it and each call could have several comments linked to it.
So it would look something like
10025 John Doe 123-555-1234
Drip
broken
timer malfunction
box
broken
side of box cracked
Valve
broken
valve leak at thread
more of same valve
more of same valve
All valves replaced
Now, I have figured out a way, albeit tedious, to separate the tables and
add autonumber primary keys to create one-to-may relationships and make
everything work (in my head at least), but I would need to be able to paste
all of the contact records into a table with the ContactID field set to
accept the numbers I give it to maintain the link with all associated call
records and then pick up autonumber from the largest number. So far, what
I've read is that this cannot be done. Is there any way to make this
transition without losing old call info?
many as three different tables. The catch is that they will have
parent-to-chld relationships and I need to delete some duplicate entries in
the first table and make sure that the linked records in the second table
link to the single parent.
I provide technical support for a plastic fittings/valves/irrigation/etc
company and we track each call with the customer's contact information and
the reason for the call. All of this is collected in one table, TSContacts.
We have almost a year worth of entries, roughly 10,000 records. The problem
is that we recieve calls from the same contacts many times, so their
information gets entered over and over again. Additionally, some issues
cannot be addressed in the one call and several calls or transactions may
take place before the issue is resolved.
ContactID Name PhoneNumber Product Problem Comments
10025 John Doe 123-555-1234 Drip broken timer
malfunction
10026 John Doe 123-555-1234 box broken side of
box cracked
10027 John Doe 123-555-1234 Valve broken valve
leak at thread
10028 John Doe 123-555-1234 Valve broken more of
same valve 10029 John Doe 123-555-1234 Valve broken
more of same valve
What we would like to do with this data is make the contact info the parent
to the call info and make the call info parent to the comments (to track
progress and a date field would be added). Each Contact could have several
calls linked to it and each call could have several comments linked to it.
So it would look something like
10025 John Doe 123-555-1234
Drip
broken
timer malfunction
box
broken
side of box cracked
Valve
broken
valve leak at thread
more of same valve
more of same valve
All valves replaced
Now, I have figured out a way, albeit tedious, to separate the tables and
add autonumber primary keys to create one-to-may relationships and make
everything work (in my head at least), but I would need to be able to paste
all of the contact records into a table with the ContactID field set to
accept the numbers I give it to maintain the link with all associated call
records and then pick up autonumber from the largest number. So far, what
I've read is that this cannot be done. Is there any way to make this
transition without losing old call info?