dividing a single column into parts

  • Hi All,

    Is there any way to split this long string column separated by DOTS

    from source into severals columns in target

    For Ex:

    LONGcolumn

    ab.cd.ef.gh

    Target should be:

    Col1 Col2 Col3 Col4

    ab cd ef gh

    Thanks in Advance

    [font="Comic Sans MS"]
    ---------------------------------------------------

    Thanks [/font]

  • In SSIS, I would be tempted to use a script task and use the VB.Net split function splitting the columns into it's parts.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • But I have to do it in a stored procude while selecting the source data,,Is it possible in a stored proc?

    Thanks

    [font="Comic Sans MS"]
    ---------------------------------------------------

    Thanks [/font]

  • Why are you posting this under SSIS if you have to do this in a stored procedure?



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Hi,

    this is really good resource: http://www.sqlservercentral.com/articles/T-SQL/62867/

Viewing 5 posts - 1 through 4 (of 4 total)

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