oracle where 条件中用case

Posted skiwndhw

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle where 条件中用case相关的知识,希望对你有一定的参考价值。

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

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


以上是关于oracle where 条件中用case的主要内容,如果未能解决你的问题,请参考以下文章

如何优化Oracle在where条件中用了自定义函数的SQL语句

oracle SQL查询中,如何在where中用条件语句,判断不同情况,追加不同的And条件?

sql语句借助case when实现自动拼装where条件

Oracle中where子句中的case表达式

Sql文的where中使用case when

case when 使用