Ssis Create Flat File Header

Please start any new threads on our newsite at. We've got lots of great SQL Serverexperts to answer whatever question you can come up with.SSIS Flat File Headers and FootersAuthorTopictjamsStarting Member8 PostsPosted - 2006-11-21: 13:59:05Hi,I am trying to export some data to a flat file to support a legacy system. The system requires that the flat file have 2 header rows with static data (not column names), the data rows, and then a footer row which contains some aggregate data from the exported data and some static data. So, it looks something like this:header row 1header row 2data rowdata rowdata row.footer rowCan someone point me in the right direction as to how something like that might be accomplished in SSIS?

The best way that I've found to accomplish this is the following:. I create a test output flat file. I populate the.txt file with the result set from the SQL query that will be used in the package. Make sure that the first row of the.txt file contains the column header names. Create a Flat File Connection.

Ssis Create Flat File Header Size

Point it to the text output flat file. Check the 'Column names in the first data row' box. This will make sure that the actual column header names will be used/shown, instead of 'Column 0', 'Column 1', etc. Click 'OK' to close the Flat File Connection Manager.

Ssis

Ssis Create Flat File Header In Word

Edit the Flat File Destination item to make sure that the actual column header names are picked up and that the fields are mapped properly between your query and the output columns of your Flat File Connection. Click 'OK'. Highlight the Flat File Connection and press 'F4' to open the 'Properties' window. There, change the 'ColumnNamesInFirstDataRow' to 'False'.Now your output flat file will contain data only.no column header row.

Size

Flat File Database

Yet you can still go to the Flat File Destination item and see the actual column header names being used there.