oracle where 条件中用case

select  
 substr(xoq.item,2,5) model
from xwp_out_quantity xoq
where xoq.vendor='&s_vendor'and (casewhen xoq.vendor='220010'then substr(xoq.item,2,1) elsenullend)=9or  (casewhen xoq.vendor='220020'then substr(xoq.item,2,1) elsenullend)=8or  (casewhen xoq.vendor='220030'then substr(xoq.item,2,1) elsenullend)=7

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

猜你喜欢

转载自www.cnblogs.com/skiwndhw/p/10351936.html