Tuesday, 8 March 2016

I have 300K records in SQL, out of that 1k records are having wrong data in one column. How you are going to fix it.



Try this...You may have better approach, but this is one approach.

1.Get right data from Source System to flat file with primary key value and column value.
EX: Employee Location is wrong, in this scenario, prepare a flat file with Epmid and EmpLocation.
2.Import above data in to same DB where your 300k records table is there
3.Now you are having 2 tables (One is actual and another one is imported table)
4.Now compare the 2 tables to find are there any data difference.
5.If you find data difference, now update actual table (300k) with imported table
6.Now compare the 2 tables to find are there any data difference, it should give 0 differences..