Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00932: inconsistent datatypes

happy10319Jan 18 2018 — edited Jan 19 2018

Hi all,

on 11.2.0.4

When running:

SELECT prcstype, prcsname

, COUNT(*) freq

, SUM(enddttm-begindttm)*86400 dur

, AVG(enddttm-begindttm)*86400 avg_dur

FROM psprcsrqst p

WHERE begindttm IS NOT NULL

AND enddttm IS NOT NULL /*have completed*/

AND runstatus IN(9,11,12,13,14,15,16,17) /*successful proc*/

AND begindttm > SYSDATE - 30 /*in the last 30 days*/

GROUP BY prcstype, prcsname;

I receive:

, AVG(enddttm-begindttm)*86400 avg_dur

             *

ERROR at line 4:

ORA-00932: inconsistent datatypes: expected NUMBER got INTERVAL DAY TO SECOND

Thanks

This post has been answered by John Thorton on Jan 18 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2018
Added on Jan 18 2018
12 comments
1,845 views