SQL Server Update a column character on the fly
I have a DB table that has a column called Pools
, the programmer m开发者_如何学编程ade an error and has the data as so:
pool1,pool2;pool3;pool4
I need to update every row in the table, and just replace the same data back in except replace(column, ',', ';')
. Replace the commas in a given column in a row with semi-colons.
Any thoughts?
update YourTable set
Pools = replace(Pools, ',', ';')
精彩评论