I have a table that has records removed and the underlying index order no longer matches the order of the numbers in the ID field. As soon as a new record is added, SQL studio shifts it somewhere else according to the original row orders.
I have reordered the master table and now want to assign the new ID to replace the old ID value in another table.
I have done all this on a spreadsheet but the table that needs updating has 30,000 or more rows and changing things manually is bound to bring in errors.
So I need to read table 2, ID field and if this ID matches the old ID in master table, replace it with the new ID.
The tables belong to an online game whereby you have approx. 1600 items (master table) and each player can have any number of these items (table 2).
If the ID change is inaccurate, player items will be transformed into something else.
Thanks for any guidance.
I have reordered the master table and now want to assign the new ID to replace the old ID value in another table.
I have done all this on a spreadsheet but the table that needs updating has 30,000 or more rows and changing things manually is bound to bring in errors.
So I need to read table 2, ID field and if this ID matches the old ID in master table, replace it with the new ID.
The tables belong to an online game whereby you have approx. 1600 items (master table) and each player can have any number of these items (table 2).
If the ID change is inaccurate, player items will be transformed into something else.
Thanks for any guidance.