HI
I have two columns Start_Time and End_Date in a table with data type TIME(6) and i want to substract the two values in a stored Procedure.
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 6526 StartFragment: 314 EndFragment: 6494 StartSelection: 314 EndSelection: 314
SELECT Log_Time INTO vStart FROM DB.LOG_TABLE
SELECT Log_Time INTO vEnd FROM DB.LOG_TABLE
SET vTotal = CAST( CAST(vEnd AS CHAR(6) ) AS INTERVAL HOUR TO SECOND(6) ) -CAST( CAST(vStart AS CHAR(6) ) AS INTERVAL HOUR TO SECOND(6) ) ;
When i try to perform the substraction i get the error '
Invalid or missing expression 'E(5407):Invalid operation for DateTime or Interval.'. Please help me.
-Arun