where gjahr=substr(current_date,1,4) and monat=substr(current_date,6,2) |
当前月和当前月-1 | ||||||
where gjahr=substr(current_date,1,4) | ||||||
and SUBSTR(ID_PERIOD,1,6)IN(substr(current_date,1,4)||substr(current_date,6,2), | ||||||
substr(current_date,1,4)||lpad(month(current_date)-1,2,'0')) | ||||||
SUBSTR(ID_PERIOD,1,6)IN (concat(substr(CURRENT_DATE,1,4),substr(CURRENT_DATE,6,2)), | ||||||
concat(substr(CURRENT_DATE,1,4),lpad(month(CURRENT_DATE)-1,2,'0'))) |