I have the following three different strings which needs to split into three different columns.
Example:
String 1:
Declare @str1 varchar(max) = 'A1,A2,A3'
String 2:
Declare @str2 varchar(max) = 'B1,B2,B3'
String 3:
Declare @str2 varchar(max) = 'C1,C2,C3'
NoteI want to store the above three strings into three different columns.
Expected Output:
colA colB colC
------------------
A1 B1 C1
A2 B2 C2
A3 B3 C3
Attempt:
SQL Fiddle: http://sqlfiddle.com/#!3/d41d8/41345