Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find "," and replace with ", "

Status
Not open for further replies.

KenArcher

IS-IT--Management
Jul 23, 2002
16
0
0
US
I have field populated with values like "Oklahoma,Texas,Kansas" - words separated by commas. I want to add a space after to commas to that carriage returns will work, changing the above value to "Oklahoma, Texas, Kansas". What SQL command will do this?
 
declare @string varchar(50)
set @string='Kansas,Kentucky,Missouri'
Print Replace(@string,',',', ')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top