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.
| Author |
Topic |
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2010-11-22 : 01:57:29
|
| hello everybody,could anybody explain me how to replace a particular letter in sql server using query.for example:i have a word 'smith' in a table.now i want the letter 'i' to replaced with letter 'e'.thanx in advance |
|
|
Devart
Posting Yak Master
102 Posts |
Posted - 2010-11-22 : 02:15:52
|
| Hello,For example:update <your_table_name>set <your_field_name>=replace(<your_field_name>,'i','e')where <your_field_name>='smith'orupdate <your_table_name>set <your_field_name>=replace(<your_field_name>,'smith','smeth')Best regards,Devart,SQL Server Tools:dbForge Schema ComparedbForge Data ComparedbForge Query Builder |
 |
|
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2010-11-22 : 07:44:12
|
| thanx buddy..is it the same while performing select operation also? |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-11-22 : 07:59:12
|
| The use of REPLACE is the same.--Gail ShawSQL Server MVP |
 |
|
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2010-11-22 : 08:19:13
|
| thanx shaw |
 |
|
|
|
|
|