Reputation: 4117
I have this setup: an output table where my results will end up consisting of
[FirstName]
[LastName]
[Address1]
[Address2]
[Address3]
[ZipCode]
[City]
[Country]
The original data consists mostly of line feed split address lines, some are split by commas, and there is one name field.
My original data tables look simply like this:
[NAME ]
[ADDRESS]
How would I translate these into one another using T-SQL?
Thanks for your time.
Matt
Upvotes: 1
Views: 733
Reputation: 16260
Your real question here is, how do I parse the contents of [ADDRESS] into separate attributes? I would forget about TSQL for now and investigate the quality of the source data to see how easy (or not) it is to parse in theory. Then find a practical solution. Some random comments:
Upvotes: 2