34,594
社区成员
发帖
与我相关
我的任务
分享
create table #a
(
fnumber varchar(255),
fshortNumber varchar(255)
)
Insert into #a(fnumber)
Select 'A01' union all
Select 'A01.01' union all
Select 'A01.01.001' union all
Select 'A01.002' union all
Select 'A01.002.01.0004'
UPDATE #a SET
fshortNumber=RIGHT(fnumber,CHARINDEX('.',REVERSE('.'+fnumber))-1)
select * from #a
drop table #a