dbTalk Databases Forums  

How to use RTRIM in a DATAFLOW task

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


Discuss How to use RTRIM in a DATAFLOW task in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jimdandy@shaw.ca
 
Posts: n/a

Default How to use RTRIM in a DATAFLOW task - 02-23-2006 , 05:12 PM






What is the best way to remove trailing spaces in a dataflow in a SSIS
package?

The SRC OLEDB connection is to a Visual FoxPro DB - all of the columns
in the tables are CHAR so trailing spaces are included in the dataflow.
The DST OLEDB connection is to a SQL database where VARCHAR fields are
defined. I want to RTRIM the trailing spaces when niserting into the
SQL Server tables in the DATAFLOW task.

It seems like a very trivial thing to do, but I can't see anything
rather than writing some ActiveX scripting which seems like a lot of
work.

Thanks in advance!


Reply With Quote
  #2  
Old   
jimdandy@shaw.ca
 
Posts: n/a

Default Re: How to use RTRIM in a DATAFLOW task - 02-24-2006 , 03:08 PM






I ended up using a derived column transform to perform this task with
the expression equal to LTRIM(RTRIM(<column>)).

Pretty simple and effective.


Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: How to use RTRIM in a DATAFLOW task - 02-25-2006 , 02:16 PM



Hello jimdandy (AT) shaw (DOT) ca,

Glad you found it and yes this is the way to go if you cannot do it in the
source statement on the source adapter.

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
I ended up using a derived column transform to perform this task with
the expression equal to LTRIM(RTRIM(<column>)).

Pretty simple and effective.




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.