dianemarie
Instructor
I always have trouble with these. I'm trying to specify order types via a parameter in the Where statement.
case @OrderType
when 'Exchange' then lo.list_order_rentexch in ('Exchange','Partial Exchange')
when 'No Exchange' then lo.list_order_rentexch in ('online','insert','rental','database')
when 'All' then lo.list_order_rentexch in ('exchange','partial exchange','online','insert','rental','database')
else ''
I'm getting "incorrect syntax near the keyword 'in'. Any help would be appreciated, also any good web references on CASE statements. Thank you.
case @OrderType
when 'Exchange' then lo.list_order_rentexch in ('Exchange','Partial Exchange')
when 'No Exchange' then lo.list_order_rentexch in ('online','insert','rental','database')
when 'All' then lo.list_order_rentexch in ('exchange','partial exchange','online','insert','rental','database')
else ''
I'm getting "incorrect syntax near the keyword 'in'. Any help would be appreciated, also any good web references on CASE statements. Thank you.