Adsense Ad

Thursday, 25 May 2017

Oracle: ORA-00975 Error Message

ORA-00975 Error Message

Learn the cause and how to resolve the ORA-00975 error message in Oracle.

Description

When you encounter an ORA-00975 error, the following error message will appear:
  • ORA-00975: date + date not allowed

Cause

You tried to add two dates together. This is not allowed. You can only add numeric values to dates.

Resolution

The option(s) to resolve this Oracle error are:

Option #1

Re-write your expression so that a numeric value is added to the date.
For example, if you tried to execute the following SQL statement:
SELECT sysdate + sysdate
FROM dual;
You would receive the following error message:
Oracle PLSQL
You could correct this error by substituting one date with a numeric value such as:
SELECT sysdate + 365
FROM dual;

No comments: