• rocky_498 (10/24/2014)


    Thanks for your help, got it I can use multicast for different file, how about ?

    Source:-

    Add, New, Pro, Len, Source

    Acorn,Null,Null,Null,Null

    Null,FC,Null,Null,Null

    Null,Null,Day,Null,Null

    Null,Null,Null,2:00,Null

    Null,Null,Null,Null,Phone

    Null,Null,Null,Null,Web

    Destination File:-

    Add, New, Pro, Len, Source

    Acorn,FC,Day,2:00,Phone

    Acron,FC,Day,2:00,Web

    this format ?

    To be honest, this is death by SQL because there is nothing in any of the rows to associate the correct rows with each other. Also, the "angular" nature of the data is typically caused by someone using an EAV as a source and not having a clue on how to do a proper CROSS TAB or PIVOT>

    My recommendation would be to save yourself a whole lot of future heartache and tell the folks that are providing the data that there format is NOT acceptable especially from a data integrity stand point and that they REALLY need to spend 10 minutes learning how to create this simple output correctly.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)