sql拆分日期字符串(20181111-20181112)

sql拆分日期字符串data_prid_desc(20181111-20181112)
如:拆分成开始时间exe_bgn_time120181111,结束时间exe_end_time120181112

substring_index(s.data_prid_desc, '-', 1) AS exe_bgn_time1
substring_index(s.data_prid_desc,'-', -1) AS exe_end_time1

猜你喜欢

转载自blog.csdn.net/weixin_40197494/article/details/83997690