I'm stumped on this one and it seems simple enough but it just isn't working. I've tried using an if statement with no luck either. I don't care which as long as it works.
WHERE ti.TheatreId in
(CASE WHEN @Group = 'Amstar' THEN ('1562', '1564', '1565', '1566', '1567', '1568', '1569', '1570') END)
(CASE WHEN @Group = 'Grand' THEN ('1552', '1553', '1554', '1555', '1556', '1558', '1560', '1563') END)
it gives an syntax error near ',' I've taken out the case statement and ran it with both criteria by cutting and pasting and it's fine. But put in the case statement no go. I'm so frustrated!
Thanks in advance.
Sarah
WHERE ti.TheatreId in
(CASE WHEN @Group = 'Amstar' THEN ('1562', '1564', '1565', '1566', '1567', '1568', '1569', '1570') END)
(CASE WHEN @Group = 'Grand' THEN ('1552', '1553', '1554', '1555', '1556', '1558', '1560', '1563') END)
it gives an syntax error near ',' I've taken out the case statement and ran it with both criteria by cutting and pasting and it's fine. But put in the case statement no go. I'm so frustrated!
Thanks in advance.
Sarah