How to loop through SQL Table from SSIS to get file names and export

  • Steve,

    This was really helpful to me. I tried implementing the same for my SSIS package. But, I have a problem.

    The datasource I'm using is OLEDB. I have the filename populated as a column in the SQL table. I have to take the same column values as the CSV File Names for Output.

    SQL Table Example:

    ID Name Salary FileName

    1 Chris 4000 File1

    2 Sam 5000 File1

    3 Robert 4800 File2

    4 Steve 6000 File2

    Now what I need is two CSV Output files File1 and File2 with data distributed accordingly.

    Please help me in this regards.

    Thanks in advance

    Kiran

  • Steve,

    How would you do this if you needed to loop through a list of TABLES and copy data from each table to a table with the same name in another DB? I've followed your example, and it worked with FILES (nice!), but not with tables. What needs to be done differently? Thanks.

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

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