时间:2021-07-01 10:21:17 帮助过:2人阅读
错误示例:
//sql.Append(" LEFT JOIN (SELECT COUNT(1) AS QTY , R.FRAMENO FROM RT_REPAIR R WHERE CURRENT DATE -DATE(R.STATUSCODEDATE10) <=365 AND STATUSCODE=‘99‘ GROUP BY R.FRAMENO) T10 ON T1.FRAMENO = T10.FRAMENO ");
sql.Append(" LEFT JOIN (SELECT COUNT(1) AS QTY , R.FRAMENO FROM RT_REPAIR R WHERE (DAYS(CURRENT DATE) -DAYS(R.STATUSCODEDATE10)) <=365 AND STATUSCODE=‘99‘ GROUP BY R.FRAMENO) T10 ON T1.FRAMENO = T10.FRAMENO ");
DB2 日期相减
标签: