开发者

problem with bulk data update in sql

开发者 https://www.devze.com 2023-01-23 23:51 出处:网络
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

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

精彩评论

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