By date

  • girl_bj (3/29/2016)


    It will be continuous. I am just testing for 1 month on how it works. The weekly data will be send as an output file.

    Is there any way that I can set in parameter to run week after week? Or just calander will be the option?

    Is it "weekly" or "every 7 days". There is a difference.

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

  • girl_bj (4/1/2016)

    I manage to run in every 7 days continuously. Added in ROW_NUMBER() OVER (ORDER BY startdate) AS Row too.

    How can I push this record as an output. I tried SSIS to push output to file. But for this how to do looping in SSIS?

    Example row 1 records will push to fileA.txt

    row 2 records will push to fileB.txt and so on.

    Any sample?

    Insert it into a recordset destination, then use a foreach loop ADO enumerator, setting it for every row in the table. Then inside the loop, set the file name as required, and then export to a file.

    Any sample i can refer online?

  • girl_bj (4/3/2016)


    girl_bj (4/1/2016)

    I manage to run in every 7 days continuously. Added in ROW_NUMBER() OVER (ORDER BY startdate) AS Row too.

    How can I push this record as an output. I tried SSIS to push output to file. But for this how to do looping in SSIS?

    Example row 1 records will push to fileA.txt

    row 2 records will push to fileB.txt and so on.

    Any sample?

    Insert it into a recordset destination, then use a foreach loop ADO enumerator, setting it for every row in the table. Then inside the loop, set the file name as required, and then export to a file.

    Any sample i can refer online?

    This is where I'll have to bow out. I do all of this type of thing in T-SQL using xp_CmdShell to call BCP. I've never used SSIS to do such and thing so can't advise.

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

  • girl_bj (4/3/2016)


    girl_bj (4/1/2016)

    I manage to run in every 7 days continuously. Added in ROW_NUMBER() OVER (ORDER BY startdate) AS Row too.

    How can I push this record as an output. I tried SSIS to push output to file. But for this how to do looping in SSIS?

    Example row 1 records will push to fileA.txt

    row 2 records will push to fileB.txt and so on.

    Any sample?

    Insert it into a recordset destination, then use a foreach loop ADO enumerator, setting it for every row in the table. Then inside the loop, set the file name as required, and then export to a file.

    Any sample i can refer online?

    I found this: http://simonlv.blogspot.co.uk/2012/05/ssis-step-by-step-002-output-data-to.html

    The search term I used on Google was "Loop export to multiple files SSIS", there's quite a few results so if you struggle with the above you can find more examples.

    Shout if you get stuck 🙂

  • Very cool. I love when folks post their search terms. It helps to improve my "Yabingooglewho". 🙂

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

Viewing 5 posts - 16 through 19 (of 19 total)

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