September 9, 2015 at 11:53 am
Here's the scenario. I've got a column with an 0 to many emails.
I want to lookup the email and replace it with an internal ID from a master table of emails
For example, data could be
column A
john.doe@mail.com;jane.smith@mail.com;jane.doe@mail.com
null
I want to lookup this email in the master email table and replace with the internal id's
column A
175;233;74
null
113
175
September 9, 2015 at 12:02 pm
This is a violation to the first normal form. Avoid storing several concatenated values and use an appropriate design for this.
In order to be able to do what you want, you need to normalize the data. You could use a query with the DelimitedSplit8k which can be found in here: http://www.sqlservercentral.com/articles/Tally+Table/72993/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply