Hi, I have a query like:
SELECT H.DocumentNumber, H.AssignedUser, L.AuthCode
FROM AP.DocumentHeader H, AP.DocumentLine L
WHERE H.UpdDate > current_date - 2
i.e. I need to return rows where UpdDate within last 2 days
but getting error:
SQL0401N The data types of the operands for the operation ">" are not compatible.
Explanation: The operation "<operator>" appearing within the SQL statement has a mixture of numeric and nonnumeric operands, or the operation operands are not compatible.
Any ideas how to get around this?
SELECT H.DocumentNumber, H.AssignedUser, L.AuthCode
FROM AP.DocumentHeader H, AP.DocumentLine L
WHERE H.UpdDate > current_date - 2
i.e. I need to return rows where UpdDate within last 2 days
but getting error:
SQL0401N The data types of the operands for the operation ">" are not compatible.
Explanation: The operation "<operator>" appearing within the SQL statement has a mixture of numeric and nonnumeric operands, or the operation operands are not compatible.
Any ideas how to get around this?