I have a table called Product. In the Product table we have something called ProductCode and NewProductCode. When we first built the tool we were anticipating the NewProductCodes to be coming down the pipe at a later date. So we added this column with NULL. So right now the DB looks like this.
ProductCode NewProductCode ... ... ...
154 NULL
648 NULL
467 NULL
788 NULL
165 NULL
546 NULL
... NULL
... NULL
Now the NewProductCodes are being sent down to us to be added to this table. I am trying to figure out an efficient way to update my Product table (About 10,000 records) with this new information. I can make it work in some ugly ways but I would like to see an efficient way to do it. Any ideas.
The mapping of old codes to new codes has been sent down to me in an excel format like this. I can always add this to a temp table to do the update and then delete that temp table.
ProductCode NewProductCode
154 r_sc29
648 r_sc52
467 r_sc79
788 r_sc15
165 r_sc66
546 r_sc45
... ...
... ...