这样,截取转换:
where concat(substr(字段名,1,4),right(concat('0',substr(字段名,6,2)),2)) between '201712' and '201809'
测试1:
select concat(substr('2018-11',1,4),right(concat('0',substr('2018-11',6,2)),2))
测试2:
应该不会有问题了,有问题追问
这样,截取转换:
where concat(substr(字段名,1,4),right(concat('0',substr(字段名,6,2)),2)) between '201712' and '201809'
测试1:
select concat(substr('2018-11',1,4),right(concat('0',substr('2018-11',6,2)),2))
测试2:
应该不会有问题了,有问题追问