开发者

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, ',', ';')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜