Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Appending multiple datasets with different columns and data types in the same file in ssis Expand / Collapse
Author
Message
Posted Friday, June 14, 2013 10:48 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, December 4, 2014 2:24 PM
Points: 20, Visits: 162
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




Post #1463688
Posted Friday, June 14, 2013 8:33 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 7:01 PM
Points: 7,139, Visits: 12,762
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
Post #1463804
Posted Saturday, June 29, 2013 4:34 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 7:01 PM
Points: 7,139, Visits: 12,762
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
Post #1468785
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse