`IF(@ParentField = 'Reason for call - Primary Issue')
BEGIN
DELETE FROM dbo.ControlBrandMapping CBM
INNER JOIN dbo.ControlManagement CM ON CM.ID = CBM.CONTROLID
WHERE CM.DefaultName = 'Reason for call - Sub Issue' AND CBM.BRANDID = @BrandId
END`
我尽力让它看起来尽可能整洁。我收到此错误 - “'CBM' 附近的语法不正确。” 请帮忙