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
 General SQL Server Forums
 New to SQL Server Programming
 find and get rid of a character (,)

Author  Topic 

macsterling
Yak Posting Veteran

56 Posts

Posted - 2009-01-23 : 19:48:51
How do I find a comma and get rid of it when it is somewhere in a column (it follows a name)

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-24 : 00:46:05
You can use the REPLACE function.

UPDATE Table1
SET Column1 = REPLACE(Column1, ',', '')

Or perhaps just to query the data:

SELECT REPLACE(Column1, ',', '') AS Column1
FROM Table1

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-24 : 10:53:02
isnt this same as

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=118507
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-01-24 : 11:20:48
And why post in the Script Library at all?



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -