Hi All,
I need help with a string with delimiter that needs to be split into column names. I have been looking for this solution for a while. Specifically what I want to do is noted below...
Currently:
I have a table with a string with delimiter column, and I need to split this string into columns as shown below: Note that the cat and subcat can vary in length...
'/cat/subcat1/subcat2/subcat3/subcat4/subcat5'
What I need is a t-sql that pivots this list into new columns as shown below:
cat subcat1 subcat2 subcat3 subcat4 subcat5------ -------- -------- -------- -------- -------- School Math Science History Arts PE
Also I need a way to insert these new columns into the existing table that has the original string with delimiter...
Thanks!!
Hi Paul,
This works Great!!!! Thanks so much, I have been splitting my hair for this solution...again Thank you!!!
Best Regards,
SM
Hi Paul / SM,
Thanks for this as well, just what I needed.
Regds,
EP