Home > Archive > MS SQL Server > October 2006 > SSIS text file manipulation









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SSIS text file manipulation
jeff

2006-10-24, 6:28 pm

Running into an issue where I'm reading in text file to be loaded into
an Oracle table. The file is provided by a customer, so I can't
control its format, so wondering short of writing some script is there
any way to remove header rows and trailer rows?

For example the first 7 rows of the file are header information that I
don't need, and when configuring the connection manager I can tell it
to skip those records. The problem is that after the detail data that
I need there are additional records that don't conform to the same
format of the detail rows.

Is there any way you can tell the connection manager to ignore the last
2 rows of a file? I'm guessing I will need to write a script to scrub
the data before SSIS uses it but wondering if anyone knows of a quick
solution?

Thanks,
Jeff

Warren Brunk

2006-10-24, 6:28 pm

I would use a conditional split in SSIS.
http://msdn2.microsoft.com/en-us/library/ms137886.aspx

First splittting out the unwanted records and grabbing the wanted records.

Then process the wanted records.

thanks,


--
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/


"jeff" <jeffa@telect.com> wrote in message
news:1158352925.455598.287110@e3g2000cwe.googlegroups.com...
> Running into an issue where I'm reading in text file to be loaded into
> an Oracle table. The file is provided by a customer, so I can't
> control its format, so wondering short of writing some script is there
> any way to remove header rows and trailer rows?
>
> For example the first 7 rows of the file are header information that I
> don't need, and when configuring the connection manager I can tell it
> to skip those records. The problem is that after the detail data that
> I need there are additional records that don't conform to the same
> format of the detail rows.
>
> Is there any way you can tell the connection manager to ignore the last
> 2 rows of a file? I'm guessing I will need to write a script to scrub
> the data before SSIS uses it but wondering if anyone knows of a quick
> solution?
>
> Thanks,
> Jeff
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com