View Full Version : Copy column problem wont update


Webee
10-18-2007, 01:17 PM
Hi

I have a column in a table which I need to display in another table I can just copy and paste it but I need to it to update with the original. I don’t want to have to use a list or combo box as the data has to be selected from them and isn’t just displayed like the original column.

Thanks

Pat Hartman
10-18-2007, 06:54 PM
Since relational database theory specifically prohibits storing duplicate data, there is no mechanism to automatically update a value in one table when a value in another table changes. Cascade Update, which you can choose when you select the enforce referential integrity option for a relationship does NOT cascade changes in data fields. It cascades changes in the value of the primary key of a "parent" table to all related records in "child" tables. So as an example (a bad one of course), if you use last name as your PK for the employee table and a person changes his name, the name change would be cascaded to the employee history table, and the dependents table, and the training table, etc.

The correct solution is to store the data once and then use queries to join the tables so that all necessary data can be shown on the same form/report.