I have a table-valued function called fn_SplitCommaSep, which comma-separates a text field (from \'a, b, c\' to 3 rows: a b c)
How can I join this to a table, taking
Storing comma-separated values in a DB aside, take a look at APPLY
So something like:
SELECT fs.TextWithoutComma, mt.Id FROM MyTable mt CROSS APPLY fn_SplitCommaSep(mt.TextWithCommas) AS fs