【发布时间】:2021-06-07 09:31:25
【问题描述】:
愚蠢的问题,因为我想用 where 子句的两个选项开始一个 select 语句,并停留在我可以过滤它的部分。问题是,我希望选项说“如果 RS_BEM 是 A1 或 A2,则搜索不在列表中的 ID,如果还有其他搜索在列表中的 ID”。
and Case when :RS_BEM like 'A1' or :RS_BEM like 'A2' then ate_msg_nr not in (select * from StoerIDs) else ate_msg_nr in (select * from StoerIDs) end
我敢打赌这非常容易,但不知何故我没有看到它。
【问题讨论】:
标签: sql oracle case where-clause