I have tow tables in sql server 2008
TBL_CustomerMaster
[FilingId] [numeric] (18, 0) NOT NULL,
[CustId] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
TBL_Customer
[FilingId] [numeric] (18, 0) NOT NULL,
[CustUnqId] [numeric] (18, 0) NOT NULL,
[CustId] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
I used bulk insert to load data into two tables for each FilingId, CustId’s for two tables are same. I have generated unique CustUnqId for TBL_Customer
Now i want to map the CustUnqId with CustId of TBL_CustomerMaster
i. e. replace CustId in TBL_CustomerMaster with corresponding CustUnqId form TBL_Customer
kindly suggest the solution.
You can try this, but enclose this into transaction and do the testing before putting anything into production environment: