UPDATE xml_turni AS xml
SET xml.ore_teoriche=CAST(( (MK_TIME(xml.data,xml.tipol_fine)-MK_TIME(xml.data,xml.tipol_inizio)) /60/60) AS DECIMAL(12,2))