case when substring(年月,6,2) in ('01','03','05'...) then 31
when substring(年月,6,2) in ('04','06',...) then 30
when substring(年月,6,2)='02' and ((cast(substring(年月,6,2) as signed)%4==0
and cast(substring(年月,6,2) as signed)%100!=0)
or(cast(substring(年月,6,2) as signed)%400==0) then 29
else 28 end
这样行不行