views:

31

answers:

3

My table contains some rows like below

  1. Lcd - projector
  2. A & A products
  3. saranvana store
  4. LG - television
  5. IFB - fridge
  6. samsung - Monitor

I want to replace space (special char) instead of - (hyphens) in all records

A: 

SQL Query to replace characters?

http://www.vbulletin.com/forum/showthread.php?260725-SQL-Query-to-replace-characters

i think This will help u..

ratty
+1  A: 
UPDATE Table
SET MyColumn = REPLACE(MyColumn, ' - ', ' ')
Craig
A: 

I'm not 100% sure what you want but to remove the hyphen you can do this:

Update dbo.MyTable
Set myCol = Replace(myCol, '-', space(0))

Or as a select statement

Select Replace(myCol, '-', space(0))
From dbo.MyTable
Barry