dbTalk Databases Forums  

trim embedd white space

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss trim embedd white space in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mitra fatolahi
 
Posts: n/a

Default trim embedd white space - 05-06-2004 , 12:44 PM






Hi Everyone,

How can i format my source string data and trim ONLY
the "carriage return"?
The trim embedded white space Trimming option in Trim
String Transformation Properties box removes any white
space embedded in the source string data but i need to
leave the spaces.

Thanks in advance for your help!

Mitra



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: trim embedd white space - 05-06-2004 , 01:35 PM






In message <938c01c43391$c01395c0$a401280a (AT) phx (DOT) gbl>, mitra fatolahi
<anonymous (AT) discussions (DOT) microsoft.com> writes
Quote:
Hi Everyone,

How can i format my source string data and trim ONLY
the "carriage return"?
The trim embedded white space Trimming option in Trim
String Transformation Properties box removes any white
space embedded in the source string data but i need to
leave the spaces.

Thanks in advance for your help!

Mitra


You could use an ActiveX Script transform and write your own function to
remove trailing Cr characters, or replace any Cr character found with an
empty string.

Check the syntax, but something like this-

DTSDestination("ColX").Value = Replace(DTSSource("ColX").Value, vbCr,
"")



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.