dbTalk Databases Forums  

Substring in CopyColumn

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


Discuss Substring in CopyColumn in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas Scheiderich
 
Posts: n/a

Default Substring in CopyColumn - 05-12-2004 , 05:42 AM






Is there a way to easily do a middle of the string (substring) on a
transformation? A copyColumn does the whole table with no changes. I
am not sure how to use middle of the string type. It seems to be only
used for one column or all the fields get the same changes.

I am having a problem with one field in some of my pages and if I can
limit the size of data it reads to something like 900 characters, this
might solve the problem.

Thanks,

Tom.


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

Default Re: Substring in CopyColumn - 05-12-2004 , 07:50 AM






Not exactly sure what you wnt but most SQL dialects have a SUBSTRING()
function which will do this for you in the SourceSQLStatement thereby
negating any trickery in the Transforms.

It sounds as though you are maybe using the 2000 "Middle of String"
transform.

This works in exactly the same way (in fact extended) as a SUBSTRING.

It only applies to the attribute(s) to which it is applied.

You could also achieve this using an ActiveX transform but that would be
much slower.




--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Thomas Scheiderich" <tfs (AT) deltanet (DOT) com> wrote

Quote:
Is there a way to easily do a middle of the string (substring) on a
transformation? A copyColumn does the whole table with no changes. I
am not sure how to use middle of the string type. It seems to be only
used for one column or all the fields get the same changes.

I am having a problem with one field in some of my pages and if I can
limit the size of data it reads to something like 900 characters, this
might solve the problem.

Thanks,

Tom.




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.