Let’s say I have a table with 3 rows — each row contains a CSV and I can guarantee that there will only ever be 1 comma
xxx,111
yyy,222
zzz,333
How could I select the table so that the resulting table has 2 columns as:
xxx 111
yyy 222
zzz 333
I’ve tried SELECT split(item,',') FROM A
But obviously, this won’t work.
Is there a functional way to do this without using cursors?
I’m using SQL Server 2008
There are no easy functional way like split() though. There is a way without using cursors: