BEGIN TRANSACTION;

BEGIN TRY

UPDATE AS_FORMS
SET FORM_Activo = 0
WHERE
FORM_nombre != 'Genérico' AND RAM_IdTesis IS NULL;

    COMMIT TRANSACTION;
END TRY
BEGIN CATCH
    ROLLBACK TRANSACTION;
    PRINT 'Error: ' + ERROR_MESSAGE();
END CATCH;