how to create multiple excel files from one table

  • how to create multiple excel files from one table..

    name will be diffent as per date column from the table..

    Thanks

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

    Thanks [/font]

  • Wow, this is a project I had to do like 3yrs ago so let me see if I can remember how I did it.

    Basically, you'll put it inside a loop container. You'll pull a set of distinct records and loop through them and for each individual one, you'll query the table and put the return into your excel. And you'll name the file from an expression that you build and change for each of the distinct items in your loop. Get it?

    1. Query distinct recordset and iterate through it using the loop container.

    2. Set the var for the excel file name to the current item in the loop. You'll prob use a script task for this.

    3. Do a data transform where you query the table for the current value and drop it in the excel.

    I guess that's about it. There are a couple small details missing, but that's the process.

    Watch my free SQL Server Tutorials at:
    http://MidnightDBA.com
    Blog Author of:
    DBA Rant – http://www.MidnightDBA.com/DBARant

    Minion Maintenance is FREE:

Viewing 2 posts - 1 through 1 (of 1 total)

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