I’d like to perform a join on a column which contains a value I would like to split on. So if the column contained email addresses I would like to join on the part before the “@” symbol.
I have seen the split function, but I didnt see anywhere I could choose which array element to pick from the result of the split?
So something like:
JOIN ON dbo.split('@',T1.Column)(0)?
I think you’re better off just joining on the substring up to the @ symbol:
See fiddle here:
http://www.sqlfiddle.com/#!6/5d0f5/8