Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


CSV Header Date as Column using SSIS 2012


CSV Header Date as Column using SSIS 2012

Author
Message
sbaer
sbaer
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 30
I'm new to both the forum and SQL Server. I'm using the Integration Services tool to manage the upload of multiple flat files into a data warehouse.

Most of the CSV files have several rows of data in the header detail before getting to the actual data. Not a problem, I just skip the first 8 rows and the data imports just fine.

My problem is that the date of the data is in the header information. I have to find the row with this value - Date range,"Mar 3, 2014 - Mar 3, 2014" - and extract that date (3/3/14) into a new column before inputting that into the destination.

If I just focus on the date, I was able to use a combination of a Flat file Source, Conditional Split (finding the row where LEFT([column],10) = "Date range"), and a Derived Column to pull that date out.

I know there is probably a better way using a script task, but I haven't gotten into C# and am not really sure where to start, or how to integrate that into the flow.

Any help that anyone can provide would be greatly appreciated.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search