SSIS Edit Flat Flie Source

Is there a way to edit a FIXED flat file source, I need to trim 14 characters to the left before it goes to the destination.
decodedAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mikhoCommented:
If you are familiar with .Net the easiest way to do this would be to create a "Transformation" script component and use code to strip the characters from the file .
0
decodedAuthor Commented:
Not really...would you give me some help.
0
mikhoCommented:
I dont code .Net myself :) , I only know its possible to do...

You could try to add a column with the 14 chars that you want to remove...
I think its in under the advanced settings on the task...

I'm not on my developer computer now so I cant check
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

decodedAuthor Commented:
i dont think that would work. that would change the rows
0
Jason Yousef, MSSr. BI  DeveloperCommented:
Hi,
Can you show an example of what you need to do, like a source and expected results? I don't get what do you say by FIXED flat file source, I need to trim 14 characters to the left before it goes to the destination.

Thanks
Jason
0
decodedAuthor Commented:
Attahed is what I mean by fixed width.

but what i am try to remove is the first 14 characters of a file:

"date=20120213" 12364 xxxxx971 898  2645   567wr

in quotes the first 14 characters.

fixed file
0
Jason Yousef, MSSr. BI  DeveloperCommented:
Oh, OK...so what's the problem then? just ignore the first 14 chars when you insert into your final destination.

or you can even read each row as ONE column, then use  a derived column to remove the first 14 chars

see attached
result.jpg
DCT.jpg
0
decodedAuthor Commented:
The problem is that I need the first 14 characters of the first row only.
0
Jason Yousef, MSSr. BI  DeveloperCommented:
oh I thought the opposite!!

then use expression substring(column, 1,14)  and that will get you the first 14 chars.
0
decodedAuthor Commented:
This works however, its remove characters for all the rows.
0
Jason Yousef, MSSr. BI  DeveloperCommented:
isn't that what you need ? or what's your actual requirement?
0
decodedAuthor Commented:
attached is what i need to remove.

what need to be erase
i just need to remove whats highlighted then import into another text file.
0
Jason Yousef, MSSr. BI  DeveloperCommented:
OK, I think we could add a script task to create a row number and in the derived column we could use:     rownum ==1 ? substring(column,14,len(column)) : column

use the same example here: http://asqlb.blogspot.com/2011/05/ssis-selective-rows-count-using-script.html to create the counter

let me know if you need more help.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jason Yousef, MSSr. BI  DeveloperCommented:
how is this working out for you? any questions?

If you're stuck, send me a sample data file and I'll create a sample package for you...

regards,
Jason
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.