Hi all,
I am trying to do the following.
Pass a value in to my SP.
Based on that value use the condition.
----------------------------------------
WHERE
CASE
WHEN @switch = 1 THEN ( r.id in (@rep) and (m.merchant_active=1))
ELSE (m.merchant_alias in (@merchant_alias) and (m.merchant_active=1))
END
I am trying to do the following.
Pass a value in to my SP.
Based on that value use the condition.
----------------------------------------
WHERE
CASE
WHEN @switch = 1 THEN ( r.id in (@rep) and (m.merchant_active=1))
ELSE (m.merchant_alias in (@merchant_alias) and (m.merchant_active=1))
END