[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 941
  • Last Modified:

Get rid of carriage returns of incoming txt using SSIS

in my SSIS 2005project, I have a flat file source.  I need to strip out extra line returns.  How can I do this?

Example, the incoming txt has extraspaces like this


fdassfasdfdasfasdfdasfsdafsdf
asdfsdfasdfasdfasdfasdfasdfasdfasdf
<---- get rid of this carriage return!
asdfasdfasdfdfasdfasfasdfasdfsdafdasf
asdfsdfasdfasdasfasdfasd
asdfasdfasdfasdfasdfasdfasdfasd
sdfdfasfs

asdfasdfasdfasdfasdfasdf
....
0
dba123
Asked:
dba123
  • 3
1 Solution
 
SweatCoderCommented:
REPLACE (expr,CHR(13),'')

...where "expr" is equal to your string:

fdassfasdfdasfasdfdasfsdafsdf
asdfsdfasdfasdfasdfasdfasdfasdfasdf
<---- get rid of this carriage return!
asdfasdfasdfdfasdfasfasdfasdfsdafdasf
asdfsdfasdfasdasfasdfasd
asdfasdfasdfasdfasdfasdfasdfasd
sdfdfasfs

0
 
dba123Author Commented:
I'm talking about SSIS 2005 in this post.
0
 
dba123Author Commented:
whoops, never mind.
0
 
dba123Author Commented:
yea, actually I was talking about SSIS,not SQL here.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now