update Staff_information set
csny = 
case when LEN(sfzh)=18 then  (substring(sfzh,7,4) +'-'+  substring(sfzh,11,2)+'-'+ substring(sfzh,13,2)) 
 when LEN(sfzh)=15 then ('19' + substring(sfzh,7,2) +'-'+  substring(sfzh,9,2)+'-'+ substring(sfzh,11,2))
 else null
end
 from Staff_information

相关文章:

  • 2021-07-25
  • 2021-10-31
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2022-02-04
猜你喜欢
  • 2021-09-29
  • 2021-09-27
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
相关资源
相似解决方案