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
 Removing Commas from a select

Author  Topic 

newsqluser123
Starting Member

7 Posts

Posted - 2008-05-15 : 10:46:37
I'm trying to export a query to a csv file. Everything works great
until I hit the name field. Is there a way to remove commas from a select statement.

Here's what my Data looks like

Item # | Name
-------------------------
1111 | Acme, Inc
1112 | Test Company, Inc


I'd like it to print out as

Item # | Name
-------------------------
1111 | Acme Inc
1112 | Test Company Inc

Thanks for any help in advance.

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-05-15 : 10:48:25
[code]Select [Item #], Replace(Name, ',', '') as [Name]
from table[/code]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -