I am trying to add multiple criteria to a Where clause in SQL Server 2014 using the following code and I am getting a syntax error.
I have tried a case statement but cannot get that to work based on the examples on this site.
Where
iif(ss.DATAAREAID = 'USMF',
(ss.ITEMGROUPID like 'S%' and ss.ITEMGROUPID not like 'SMS%'),
(ss.ITEMGROUPID like 'SW%' and ss.ITEMGROUPID like 'SS%')
I am sure it is a quick solution, but any help would be appreciated.