﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Integration Services / Data Warehousing  / SSIS - Import flat file with trailer / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 08:52:20 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SSIS - Import flat file with trailer</title><link>http://www.sqlservercentral.com/Forums/Topic1365580-364-1.aspx</link><description>This might be useful.[url]http://www.bidn.com/articles/integration-services/234/handling-complex-text-files-in-ssis[/url]</description><pubDate>Mon, 01 Oct 2012 12:32:50 GMT</pubDate><dc:creator>Daniel Bowlin</dc:creator></item><item><title>RE: SSIS - Import flat file with trailer</title><link>http://www.sqlservercentral.com/Forums/Topic1365580-364-1.aspx</link><description>Agreed that the simplest way is to use a conditional split if possible.  However, if your footer record(s) is not structured like your other rows, it's possible that you could get an error during processing, or worse, the footer row(s) would actually be processed with your data.  In cases such as that, you may have to use a couple of derived column transformations to handle the data, or possibly a script component to programmatically filter out those rows.This is one area where SQL Server 2012 offers a distinct advantage - it won't blow up if you have files with dissimilarly structured rows.  If you're on 2012, the conditional split design pattern for filtering header/footer rows is usually your best bet.hth,Tim</description><pubDate>Mon, 01 Oct 2012 11:21:18 GMT</pubDate><dc:creator>Tim Mitchell</dc:creator></item><item><title>RE: SSIS - Import flat file with trailer</title><link>http://www.sqlservercentral.com/Forums/Topic1365580-364-1.aspx</link><description>[quote][b]apache626 (9/27/2012)[/b][hr]I have a flat file with trailers that the total the amounts in certain columns. I need to import the trailer into a different table.  How can I split the data so that I can put the trailer data into a different table.  Here is the sample data below:1002A	Mickey   Mouse	500.00	25.00	ACMECORP  1000.001002B	Duck      Donald 	125.00    15.00      ACMECORP  2500.001002T     Doe       Jane        750.00	20.00	ACMECORP   2300.001002		           1375.00	60.00		     5800.00      20101003		6740.56	75.00			7800.23 2011[/quote]Try using conditional split.However please provide more input for more assistance e.g. 1. What is the trailer part in above example ?2. Is there any fixed pattern or length for this ?3. Logic behind trailer generation in more detail.</description><pubDate>Thu, 27 Sep 2012 21:36:04 GMT</pubDate><dc:creator>rhythmk</dc:creator></item><item><title>SSIS - Import flat file with trailer</title><link>http://www.sqlservercentral.com/Forums/Topic1365580-364-1.aspx</link><description>I have a flat file with trailers that the total the amounts in certain columns. I need to import the trailer into a different table.  How can I split the data so that I can put the trailer data into a different table.  Here is the sample data below:1002A	Mickey   Mouse	500.00	25.00	ACMECORP  1000.001002B	Duck      Donald 	125.00    15.00      ACMECORP  2500.001002T     Doe       Jane        750.00	20.00	ACMECORP   2300.001002		           1375.00	60.00		     5800.00      20101003		6740.56	75.00			7800.23 2011</description><pubDate>Thu, 27 Sep 2012 20:02:12 GMT</pubDate><dc:creator>apache626</dc:creator></item></channel></rss>