Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 using replace function with 2 keywords to look for

Author  Topic 

rtutus
Aged Yak Warrior

522 Posts

Posted - 2007-10-16 : 14:23:24
Hi,
We have this syntax from Microsoft for Replace function:

REPLACE ( string_expression1 , string_expression2 , string_expression3 )

I want to search for two keywords and not only one:
images\ and images/ (second one is with back slash.

Is it possible to include something like:

images/ OR images\ in expression2 like

REPLACE ( string_expression1 ,'images/ OR images\', string_expression3 )

I want something like that, how do I get that please?

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-10-16 : 14:43:50
you need to do 2 REPLACE's.

REPLACE( REPLACE ( string_expression1 , 'images/' , string_expression3 ), 'images\', string_expression3 )


Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

rtutus
Aged Yak Warrior

522 Posts

Posted - 2007-10-17 : 09:14:34
Thank you.
Go to Top of Page
   

- Advertisement -