July 28, 200421 yr In the not-so-distant future of our database, we are going to try to make some changes. One of them is changing a field. It is a key value that is used to relate the Customer to MANY different files throughout the system. The key is stored on one file, and relationships tie in through all the files via this one field. The previous developer used a system that created this field via an increasing index, and what we want to do is change this field to be representative of the main key(such as a customer ID). I know how to change the field to a different type, and know how to change the main file's attribute to the new values, but how would I go about making sure the relationships throughout all of the other files remain intact? Once the data is stored in the main file, is there a way to change ALL of the fields in the other files/records to the new data I am to implement?
July 29, 200421 yr I'd advise adding the key as a new field in each file, starting with the Customer file. Populate the key in the Customer file, then use the existing relationships to set the new key in the other files. Once this is done you can change the relationships to use the new keys, or use Replace to set the old key to be the value of the new key. Whatever you do, make sure to have a good backup, in case something goes wrong, and test it thouroughly before making it available for users again. And finally. make sure that your new keys are unique--don't use phone numbers or names for relationship keys.
Create an account or sign in to comment