${IF(len(rptYearMonth)=0,""," and d.RPT_DATE='"+LEFT(rptYearMonth,7)+"'")}
日期传参为年月,rpt_date为日期格式,上面如何改
${IF(len(rptYearMonth)=0,""," and LEFT(d.RPT_DATE,7)='"+rptYearMonth+"'")}
你这个,需要处理成一样格式,都是年月
你什么数据库,不同数据库处理方式不一样