where 1=1
and [gaizhangriqi] >= '${starttime}'
and [gaizhangriqi] <= '${endtime}'
现在是这样写的,不填日期的话查不出结果,感谢大家帮忙!!
IF(LEN(starttime)==0,""," AND [gaizhangriqi] >='"+starttime+"'" )
IF(LEN(endtime)==0,""," AND [gaizhangriqi] <='"+endtime+"'" )