请问在数据集中原本sql条件是where ym<='${截至月份}',我想把它变成: 1、当${截至月份} =select convert(char(6),dateadd(dd, - DATEPART (weekday , getdate()+@@DATEFIRST -1)-2,getdate()),112) 时 ;取where ym<='${截至月份}' 2、当${截至月份} <>select convert(char(6),dateadd(dd, - DATEPART (weekday , getdate()+@@DATEFIRST -1)-2,getdate()),112) 时; 取where ym<='${截至月份}'-1 请问最后这个sql条件 应该怎么写?
|