I'm trying to perform a Query that takes the current TIMESTAMP and subtracts an older TIMESTAMP from it, leaving a duration between the two.
So far, my effort of
UPDATE FlightBooking SET Duration = CURRENT_TIME - (SELECT BookingTime FROM FlightBooking WHERE BookingID=1) WHERE BookingID=1;
where CURRENT_TIME is todays date, and BookingTime is the old date.
doesnt seem to work, returning the error
'The data type of an operand of an arithmetic funciton or operation "-" is not numeric'
Simply put, I want to subtract the the old timestamp from the current timestamp.