Použijte jiný formát pro CASE
prohlášení:
CASE
WHEN vc_shape IN ('02', '51') THEN SET dc_square_1 = dc_square_1 + dc_row_total;
WHEN vc_shape IN ('06', '30', '83') THEN SET dc_square_2 = dc_square_2 + dc_row_total;
.....
.....
ELSE
BEGIN
END;
END CASE;