表里面的工资是截至2月的,我将GETDATE()改成我的日期字段deptdate,也没查询出1月的数据,请问是哪里写的有问题?SELECT deptdate,province 省,city 市,posts 职位,dname 姓名,sum(Ssalary)应发底薪,sum(Psalary)绩效,sum(comsalary)提成,sum(totalsalary)汇总合计,sum(realsalary) 实发金额 FROM .WHERE deptdate >= DATEADD(month, DATEDIFF(month, 0, GETDATE()) - 1, 0)AND deptdate < DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0)${if(a=='熊婷'||a=='胡桂丹',"","and upstaff = '"+ a+"'")}${if(len(pro) == 0,"","and province in ('" + pro + "')")}${if(len(city) == 0,"","and city in ('" + city + "')")}${if(len(year) == 0,"","and year(deptdate) in ('" + year + "')")}${if(len(month) == 0,"","and month(deptdate) in ('" + month + "')")}GROUP BY province,city,posts,dname,deptdate