IF EXISTS(SELECT 1 FROM [dbo].[ramo] WHERE [idramo] = 52)
BEGIN
	UPDATE controle SET IDRAMO = 4 WHERE IDRAMO = 52;
	DELETE FROM ramo WHERE IDRAMO = 52;
END