I have a SQL Server database, with a specific column I am trying to extract data from. The data is concatenated together into a delimited list, with the delimited being a semicolon.
So lets say that
select ColumnA, ColumnB
from TableA
produces a result set like this
ROW 1
ColumnA - 1
ColumnB - value 1; value 2; value 3
ROW 2
ColumnA - 2
ColumnB - value 4; value 5; value 6
The delimiter is always a semicolon. I have a secondary table which I want to store the values in on a one-to-one basis, lets call it TableB
So I want a dataset like:
1 | value 1
1 | value 2
1 | value 3
2 | value 4
2 | value 5
2 | value 6
Can anyone help me with the SQL code to do this type of transformation?