I have the following string that I need to split from a field called symbols
234|23|HC
This is my current SQL statement
declare @t xml;
Set @t = (
Select symbols from tc for xml auto, elements)
Select @t;
which produces <symbols>234|23|HC</symbols>
but I need to split the string into child nodes so the result is like this:
<symbols>
<symbol>234</symbol>
<symbol>23</symbol>
<symbol>HC</symbol>
</symbols>
A replace version that takes care of the problem characters.
Result: