Why I get the following syntax error in this section of stored procedure :
Incorrect syntax near the keyword 'FROM'.
WITH CTE_Residence_Overtime
AS
(
SELECT *
FROM #Residence
)
UPDATE t1
SET t1.over_time = t1.over_time + CONVERT(TIME, CAST(CTE_Residence_Overtime.overtimeHours AS VARCHAR(2))
FROM r_overtime AS t1
INNER JOIN CTE_Residence_Overtime
ON t1.[trans_date] = CTE_Residence_Overtime.[dayDate];
CONVERT()