字符串截取

1.对字符串处理,去掉后面两个0,去掉前面数字是0的。'000123010000' 截取之后为1230100

select substring('000123010000',patindex('%[1-9]%','000123010000'),11-patindex('%[1-9]%','000123010000'))

主要是定位出第一个不是0的位置

2.

原文地址:https://www.cnblogs.com/cnajian/p/2064255.html