,Prod ,[Set_size] ,IIF(([Prod] in ('Bottle','JUG') AND SET_SIZE > 0) or [Prod] in ('Shower','Other') AND SET_SIZE >= 0) or [Prod] in ('Classic', 'Water') AND SET_SIZE = 0, 'OK', 'Откорректировать') AS [проверка set size] FROM [SO].[dbo].[AssortmentList_SO]
,Prod
,[Set_size]
,IIF(([Prod] in ('Bottle','JUG') AND SET_SIZE > 0)
or [Prod] in ('Shower','Other') AND SET_SIZE >= 0)
or [Prod] in ('Classic', 'Water') AND SET_SIZE = 0, 'OK', 'Откорректировать')
AS [проверка set size]
FROM [SO].[dbo].[AssortmentList_SO]