mssql split column string into rows

  • I have select results

    CAGE_CODEBUS_TYPE_STRING

    6UC622U.V2

    6UHK62X.A5.VW.XS

    6U4M32U.V2

    6U7L823.27.2X.8E.8W.A2.PI.VW

    6U4X42X.VW

    6UJU92U.LJ.V2

    6U6T92X.VW.XS

    6U9K12X.LJ.VW

    5NFQ427.2X.8E.8W.A2.HQ.LJ.VW

    5R4D827.2X.8E.8W.A2.HQ.LJ.VW

    and I want to split BUS_TYPE_STRING

    into row like

    6UC62 2U

    6UC62 V2

    6UHK6 2X

    6UHK6 A5

    6UHK6 VW

    6UHK6 XS

    ....

    What is the bestway to achieve this?

  • The best way is to use the 8K Splitter.

    Check the following article 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 1 (of 1 total)

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