July 14, 2010 at 8:12 am
Hello,
I am looking for a way to read a flat file using srcipt task. The flat file is a ~ delimited text file. Please see
below for a sample (This file is also attached).
R00A120~L10898~"-89789.00"
R00A120~L10823~100.32
R00A120~L10843~"-9789.30"
R00A120~L10878~1003
From this file i need to read the first 8 characters into a variable.
Any help, please. Is this even possible. I hope it is!
July 14, 2010 at 12:08 pm
using system.io
read full line in a while loop and take what ever lengh you wanted from that using left function.
July 14, 2010 at 12:44 pm
If you just need the 1st 8 character.. Then use {LF} as your Row and Column Delimeter and then you can use derived column to get the 1st 8 characters of every row using a Substring - Substring(ColumnName,1,8) and then use a Recordset destination with a Object variable to store all the parsed values from the file ... which can be later used in the control flow task for other puposes...
Let me know if you need more help
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply