I am fairly new to SQL Programming and I can't find a solution to a problem I'm having.
I have a table which looks like that
ID Var_to_split
---------------------
1 abc, def, ghi
2 jkl
3 mno, pqr
the output should be
ID Var
--------
1 abc
1 def
1 ghi
2 jkl
3 mno
3 pqr
I don't know how many characters there are in each row I just know that they are delimited by a ','
I found several questions on here to split a String. (eg T-SQL: Opposite to string concatenation - how to split string into multiple records)
But they all work only with a single string. I want it to work within a table for each ID.