Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Cleanup
Message
From
25/01/2012 06:32:50
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Scripting
Title:
Data Cleanup
Miscellaneous
Thread ID:
01533668
Message ID:
01533668
Views:
70
I've got one for the SQL people.

I've got a database in SQL Server with a table called Providers with prv_PK the primary key. There is another table called ClaimItems that stores the Provider Key in its cit_prvFK field.

The data was imported from a spreadsheet, so you know there are lots of spelling mistakes so the same provider might have ended up in the Providers table twice (or more) if there was a slight misspelling.

So for example I have these as separate Providers:

Superpharm
Superpharm Limited
Superpharm Limted

and these:

Tropical Pharmacy
Tropical Pharmcay

Now, I need to clean up the data which means switching the cit_prvfk value to the prv_pk value of the Provider I want to keep and then deleting the other providers.

This list of duplicates has about 100 providers. I can do this one by one, but it'll take ages. How would you suggest approaching this?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Next
Reply
Map
View

Click here to load this message in the networking platform