• p.shabbir (4/21/2015)


    Phil Parkin (4/21/2015)


    p.shabbir (4/21/2015)


    Hi phil,

    Thanks for the quick response. I know that one DFT per file will do but, what if we have more files(Say 50 or 100 files). It will be pain to create that many DFT's.

    Can you briefly tell me how to do with forloop container or provide me a reference link.

    Thanks,

    I can think of a way to do it with a for loop, but the way that comes to mind is just an abstruse way of implementing a foreach loop (FEL).

    You will find few examples to refer to, because everyone else will be using a FEL 🙂

    Is this some sort of fun technical challenge, or is there good reason not to use a FEL?

    Actually I have been asked in an inteview. So just wanted to check and try out once by ssc experts suggestions and sorry for that not mentioning initially.

    Heh... I'd shock and mortify the interviewer by saying that you don't need SSIS to do such a simple thing. It can be done using only T-SQL and it's not that difficult. I'd also explain how I'd do it and why I'd do it instead of using SSIS even if they were all spreadsheets or ragged right or true CSV, etc, etc.

    I don't actually recommend that you tell someone that on an interview, though, because they get all huffy and ask you "Who do you think you are? Jeff Moden???". 😉

    --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)