Possible Duplicate:
Split string in SQL
I have a field that contains values like:
xxx-xxxx-xx-xx
xxxx-xx-xxxx-x
In excel, if I used the "text to columns" feature (with the "-" as a delimiter), I would end up with:
xxx xxxx xx xx
xxxx xx xxxx x
I am trying to accomplish the same effect in Sql Server 2008 using sting functions like charindex
etc but just can't seem to get the hang of it.
Thanks in advance for your help. John