How to take string and turn into multiple rows

  • Hello, I am looking to turn a string into multiple rows of data.

    For example, my data is:

    ID STR

    100 ABC~DEF~GHI~JKL~MNO~PQR~STU~VWZ~YZ

    I would like to take the row above and create rows delimited by "~" to get the result:

    ID STR

    100 ABC

    100 DEF

    100 GHI

    100 JKL

    100 MNO

    100 PQR

    100 STU

    100 VWZ

    100 YZ

    Is it possible to do this?

  • Check the following article to get the best string splitter available.

    http://www.sqlservercentral.com/articles/Tally+Table/72993/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply