I have a task to complete where I have to import around 970,000 users from someone else's database into ours. In the source DB, there is a phone number field that contains multiple phone numbers concatenated into one hideous string.
Here are some data examples:
|Home: 555-555-5555 Office: (555)-555-5555 Work: 5555555555|
|Home: Office: 555\555-5555 Work: 555-555-5555|
|Office: 555-555-5555 Home: (555)555-5555 some Comment here|
The problems that I'm running into is
- The order of the numbers is inconsistent
- There are some free text comments strewn about
- Some of the phone numbers have different formatting.
I would really prefer to do this through SQL if possible and am pretty stumped on doing this in an efficient manner with minimal Manual adjustment.
In my DB, we have separate columns for each phone number type, so I basically need to split those strings into their appropriate columns.
Please tell me if I left anything out.