Split one field into multiple using a delimiter

  • Hey Steve,

    Good code - but if you wrap it in [ code="sql" ] [ /code ] tags (remove those extra spaces), it will look much nicer on the page 😉

    The PIVOT is cool if there is a known, constant, number of delimited strings (though a manual PIVOT based on CASE is faster).

    Side note: a more general problem that most methods struggle with is that of the quoted/embedded delimiter:

    apple,pear,banana,"melon,honeydew",grape

    Paul

  • David,

    If I ever end up having to maintain that code, you may expect a cold stare or two in the hallway 😀

    Paul

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

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