SSIS QUESTION

  • Hi guys,

    Here is the situation; I have source data like this

    P#

    123

    245

    678 894 258 623

    523 513

    Here is my target table

    P# Sub P#

    123 NULL

    245 NULL

    678 NULL

    894 678

    258 678

    623 678

    523 NULL

    513 523

    Note:- P# is a Parent, and Sub P# is a Child,

    Please help me out how I can done in SSIS or T-SQL, my whole project I am doing through SSIS. Any help would be big help for me. Thanks.

  • use two loops, one to go down the rows and one to go across the row finding spaces

    you don't say what your source data is in...but try to shift it into a table with an autonumber field to use

  • What data source are you using ? Could suggest a solution only if you can give me some idea of this.

    __________________________________________
    ---------------------------------------------------
    Save our mother Earth. Go Green !!!

  • Hey Rocky,

    If you can put your data into a consumable format like you'll find in the first link of my signature, there's a pretty easy solution using Tally Tables that can be done.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

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

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