Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Truncate if possible

Truncate if possible

Truncate if possible

Not sure if anyone can advise on a SSIS package that I have that joins 2 CSV files together.

In The first one I have a Custid of 11003349270
In the second file I have Custid of 3349270

The second file will always be like this the last 7 digits of the first file custid.

In my SSIS I have them with 2 flat file sources, 2 sorts which then merge join and then creates a flat file destination. It is falling on the 2 custid codes being different. I have no other way to match the two files other than the custid,

Have you any idea how I can truncate the File1 CustID field to the last 7 digits in the SSIS package

Any ideas please. Thanks

RE: Truncate if possible


You can put the data into staging tables then in file one you can take the right 7 characters to match to file 2:

CODE --> sql

Select right(columnName,7) from tableName 


RE: Truncate if possible


Thanks, yes I used a derived column and used the right(columnName,7), all working now

RE: Truncate if possible

Glad you got a solution.

Thank you for the star.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close