if object_id('[tb]') is not null drop table [tb]
go
create table [tb]([col] varchar(5))
insert [tb]
select '0101X' union all
select '0102Y' union all
select '0103Z' union all
select '0104A'
select
case when right([col],1)<>'a' then left([col],4)+char(ascii(right([col],1))-1) else [col] end [col]
from [tb]
col
------
0101W
0102X
0103Y
0104A
(4 行受影响)
求一个英文字符的前置字符
最新推荐文章于 2022-08-12 09:18:23 发布
458

被折叠的 条评论
为什么被折叠?



