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)
 Update Statement.

Author  Topic 

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2005-06-01 : 07:18:09
Hi all,

I was writing one update query. The query should perform somthing like find and replace feature which you in mostly all the microsoft softwares.

i have the columns name Description, which contains the description of certain companies. there is one specific compnay name as Xyx.. i want to replace this Xyx compnay with some another name.

The data in the Column is somthing like
DescE
Xyx compnay is located in the Saudi, Xyx compnaies deals with this.
----------------------------
---------------


so i want to write the update which will update all the Xyx company with same another company rest all should remain the same.

Thanks !!!



Complicated things can be done by simple thinking

AndyB13
Aged Yak Warrior

583 Posts

Posted - 2005-06-01 : 07:36:48
Look up REPLACE in BOL

Example
SELECT REPLACE('This is XYZ Company','XYZ','ABC')

Andy

Beauty is in the eyes of the beerholder
Go to Top of Page
   

- Advertisement -