Some arithmetic combinations of DATETIME, INTERVAL, and numeric values are meaningless and are not allowed. Review the arithmetic expressions in this statement. Possibly one of them is using a DATETIME or INTERVAL column or variable by mistake. If not, see your SQL reference material for the valid use of these data types.