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 2008 Forums
 Transact-SQL (2008)
 how to replace these characters to underscores

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2011-08-12 : 15:52:02
I have field A.ModTitle

want to replace "/" to "_"
also "\" to "_"

Thank you very much for the helpful info.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-08-12 : 15:55:44
SELECT REPLACE(REPLACE(A.ModTitle,'\','_'),'/','_') FROM myTable
Go to Top of Page
   

- Advertisement -