开发者

problem with bulk data update in sql

i have this values in a coulmn say accountno in table record:

1,002
1,044
1,086
1,108
1,126
1,190
1,226
1,258
1,260

now i开发者_如何学C want to update them as

1002
1044
1086
1108
1126
1190
1226
1258
1260

the column is of type string. how can i do it??


assuming you are using SQL server -

update table 
set accountno = REPLACE(accountno,',', '')


UPDATE record
SET accountno = replace(accountno,',','')
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜