My Oracle Support Banner

E-QR: Getting Error "ORA-00932: Inconsistent datatypes: expected DATE got NUMBER (50,380)." While Creating PSQUERY Expression for Calculate Date Difference for example (SYSDATE - A.DUE_DT) ? (Doc ID 2867854.1)

Last updated on JULY 26, 2023

Applies to:

PeopleSoft Enterprise PT PeopleTools - Version 8.58 and later
Information in this document applies to any platform.


PSQUERY fails while adding expression SYSDATE-A.DUE_DT and the A.DUE_DT is updated as TO_CHAR(A.DUE_DT) in PT 8.59

While expression SYSDATE - A.DUE_DT is added as field the SQL formed is SYSDATE - TO_CHAR(A.DUE_DT) however calculating SYSDATE - A.DUE_DT runs successfully in SQL Developer.

 The error occurs when executing the PS Query on the Query Manager - Run tab in PIA.

"A SQL error occurred. Please consult your system log for details.

Error in running query because of SQL error, Code=00932, Message=ORA-00932: Inconsistent datatypes: expected DATE got NUMBER (50,380)."

Steps to Replicate the issue:

The issue can be reproduced at will with the following steps:
       1. Navigate to Reporting Tools > Query > Query Manager
       2. Go to Expressions tab
       3. Add the new expression
       4. Use the expression as a field
       5. Go to Run tab to execute the query
       6. The error occurs 




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.