dbTalk Databases Forums  

Replacing certain characters on column?

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


Discuss Replacing certain characters on column? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kim Noer
 
Posts: n/a

Default Replacing certain characters on column? - 10-10-2004 , 10:50 AM






Hi there!

Currently I have a simple query that selects a product id and combines this
with a URL, so that the result comes out as http://www.x.y/page.asp?pid=zzz
..

This is just with a simple 'copy column' DTS. But I want to expand this, and
replace certain characters with some other. I strongly believe it can be
done with an ActiveX script, but I am absolutely clueless in how to select
the 'source column', replace characters, and 'deliver' the result to the
'destination column'.

Is there a friendly soul here that can help me on the way in this (simple?)
task?

--
I doubt, therefore I might be.



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

Default Re: Replacing certain characters on column? - 10-10-2004 , 12:23 PM






If you are using SQL Server then instead of simply specifying a table as the
source you can specify a statement and use the REPLACE() function
Even if you are not using SQL Server then most Sources will have a REPLACE()
type function.

Yes you can use an ActiveX transform and the syntax would be similar to

DTSDestination("DestinationColumnName") = REPLACE(
DTSSource("SourceColumnName),...........)

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"Kim Noer" <kn (AT) nospam (DOT) dk> wrote

Quote:
Hi there!

Currently I have a simple query that selects a product id and combines
this with a URL, so that the result comes out as
http://www.x.y/page.asp?pid=zzz .

This is just with a simple 'copy column' DTS. But I want to expand this,
and replace certain characters with some other. I strongly believe it can
be done with an ActiveX script, but I am absolutely clueless in how to
select the 'source column', replace characters, and 'deliver' the result
to the 'destination column'.

Is there a friendly soul here that can help me on the way in this
(simple?) task?

--
I doubt, therefore I might be.




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.