question

dpauza13 avatar image
dpauza13 asked

Rounding Count for time query

I'm having a problem running the following query: select decode(home_community_name, '9.9', 'Total',home_community_name) as homeCommunityName, round(avg((a.end_time - a.start_time ) * 24 * 3600)) as Count from vleruser.actions a, vleruser.uddi_lookup b where a.home_community_id = b.home_community_id and a.action_type_id in (102) and a.status_code in (0,2,9) and a.start_time >= TO_DATE('2015-05-01 01:00:00', 'YYYY-MM-DD HH24:mi:ss') and a.start_time <= TO_DATE('2015-05-25 23:59:59', 'YYYY-MM-DD HH24:mi:ss') group by home_community_name; I'm getting the following error: ORA-00932: inconsistent datatypes: expected NUMBER got INTERVAL DAY TO SECOND 00932. 00000 - "inconsistent datatypes: expected %s got %s" *Cause: *Action: Error at Line: 1 Column: 140 Not sure how to solve it.
error-handling
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JohnM avatar image JohnM commented ·
I'm assuming this is related to Oracle correct?
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.