We ran into a problem outside of the primary key; this data entry was established as a worthwhile value for ease of entry Because all the data was originally added directly. However the meaningful value is not always present in all entries. So now we are going in an auto-generated, non-meaningful key. But I have to update the database to reflect it.
Then my product table has column serial (original key) and ID (new PK). In my section table 2 columns are set to FK_sariel (old FK) and FK_product (new FK, currently set to 0 for all entries).
Is there an update statement that will run through the Part table and set the FK_product to the value of the id in the product table, where Serial = FK_sialial?
add parts to parts. FK_Searial = SET parts with products. FK_product = products.Id;
Comments
Post a Comment