Professional Documents
Culture Documents
com/
http://paidsocialmediajobs.com/pages/full-join-page/
Please start any new threads on our new site at http://forums.sqlteam.com. We've
got lots of great SQL Server experts to answer whatever question you can come u
p with.
Our new SQL Server Forums are live! Come on over! We've restricted the ability t
o create new threads on these forums.
SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?
All Forums
SQL Server 2000 Forums
Transact-SQL (2000)
How to replace a comma with a space in a field
Printer Friendly
Reply to Topic
Author
Topic
jej1216
Starting Member
27 Posts
Posted - 04/05/2007 : 18:28:32
________________________________________
We have a field called NAME and the data in it is like this:
'Smith, Joe'
We need to replace the comma with a space so it looks like this:
'Smith Joe'
I know in Oracle I could use TRANSLATE to change the comma to a space. Is there
an equivalent to TRANSLATE in SQL Server 2000?
TIA,
jej1216
russell
Pyro-ma-ni-yak
USA
5072 Posts
Posted - 04/05/2007 : 18:32:53
________________________________________
use the Replace function
Replace(name, "," , " ")
sshelper
Posting Yak Master
216 Posts
Posted - 04/05/2007 : 18:34:35
________________________________________
Instead of using double quotes, use single-quotes:
UPDATE YourTable