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 2005 Forums
 SQL Server Administration (2005)
 How to change/replace column values.

Author  Topic 

skybvi
Posting Yak Master

193 Posts

Posted - 2011-11-28 : 15:09:27
Hi,
I have a table with many columns. It contains the details of the products.

One of the column is product description.

For example..

ITEMNMBR DESCRIPTION
JC463 Tropicana juice " 24 oz

I want to replace the " with a '+' sign...
Like that there are 100's of products like that...
So I need any script which I can run against the table.

Regards,
Sushant
DBA
West Indies

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-11-28 : 16:47:12
UPDATE myTable
SET Description=REPLACE(Description,'"','+')
WHERE Description LIKE '%"%'
Go to Top of Page

skybvi
Posting Yak Master

193 Posts

Posted - 2011-11-29 : 11:41:57
thxs dude
it worked!

Regards,
Sushant
DBA
West Indies
Go to Top of Page
   

- Advertisement -