Appending multiple datasets with different columns and data types in the same file in ssis

  • Dataset 1

    Name record amount

    frank 234 1500

    Davis 235 10000

    Dataset 2

    Location City

    California San francisco

    New York Bronx

    I am wondering if there is a way to export both datasets to the same file in ssis.

    File will have both dataset

    frank 234 1500

    Davis 235 10000

    California San francisco

    New York Bronx

  • One option: use a Script Task to write each resultset to the same file one after the other.

    Another option: use a Transformation Script Component to change the rows of each resultset to a single wide string, then use the Union All Transformation to bring them into one resultset before writing that to a Flat File Destination.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • A third option (just learned) is to write to the same file three times but do not overwrite the file when you write the data and footer rows:

    http://www.sqlservercentral.com/Forums/FindPost1468463.aspx

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

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

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