`
piperzero
  • 浏览: 3475498 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

oracle where 条件中用case

 
阅读更多
select  
 substr(xoq.item,2,5) model
from xwp_out_quantity xoq
where xoq.vendor='&s_vendor'
and (case when xoq.vendor='220010' then substr(xoq.item,2,1) else null end)=9
or  (case when xoq.vendor='220020' then substr(xoq.item,2,1) else null end)=8
or  (case when xoq.vendor='220030' then substr(xoq.item,2,1) else null end)=7

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics