INTERVAL DAY TO SECOND to NUMBER
681516Jan 23 2009 — edited Jan 23 2009I am receiving the following error when I try converting and Interval to a Number, and inserting into a NUMBER feild.
SQL:
-- the CreatedDate and usage Date are DateTime format 'yyyy-MM-dd HH:MI:ss'
update SOMETHING set Elapsed_Hrs_Accnt_Creation =
(
TO_NUMBER(TRUNC((CreatedDate - UsageDate)*24))
) where id = id
Error:
ORA-00932: inconsistent datatypes: expected NUMBER got INTERVAL DAY TO SECOND
Any suggestions on what I am doing wrong would be greatly appreciated.
Thanks.