急~~
--配送方式
and convert(varchar(5),right(deliverymodo,1)) in
case
when (@deliverymodo=0 or @deliverymodo is null) then ( '1 ', '2 ', '4 ')
when (@deliverymodo=4) then ( '4 ')
else ( '1 ', '2 ')
end
这种方式错误,请问如何来修改?我不想用字符串来控制?
------解决方案--------------------and convert(varchar(5),right(deliverymodo,1)) in
case
when (@deliverymodo=0 or @deliverymodo is null) then '1,2,4 '
when (@deliverymodo=4) then '4 '
else '1,2 '
end