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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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 .
decodedAuthor Commented:
Not really...would you give me some help.
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
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

decodedAuthor Commented:
i dont think that would work. that would change the rows
Jason YousefSr. 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
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
Jason YousefSr. 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
decodedAuthor Commented:
The problem is that I need the first 14 characters of the first row only.
Jason YousefSr. BI  DeveloperCommented:
oh I thought the opposite!!

then use expression substring(column, 1,14)  and that will get you the first 14 chars.
decodedAuthor Commented:
This works however, its remove characters for all the rows.
Jason YousefSr. BI  DeveloperCommented:
isn't that what you need ? or what's your actual requirement?
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.
Jason YousefSr. 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.

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 YousefSr. 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
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.