最近在做一个数据库操作的程序
须将类似于AE01,AE01W1,AE01W2,AE01W3等数据进行转换
将其全部转换为AEO1
我的作法如下:

update inst_temp_list set sty=
case substring(sty,len(sty),1)
when 'w' then substring(sty,1,len(sty)-1) else sty end
update inst_temp_list set sty=
case substring(sty,len(sty)-1,1)
when 'w' then substring(sty,1,len(sty)-2) else sty end

如作法有不当之处,请加以指正,谢谢!

相关文章:

  • 2022-01-28
  • 2021-12-18
  • 2022-03-01
  • 2021-11-26
  • 2021-10-26
  • 2022-01-16
  • 2021-07-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
  • 2021-10-02
  • 2021-12-23
  • 2021-07-20
相关资源
相似解决方案