Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
场景是:
decode(rslt1, 'stores',('stores,dead store'), rslt1);
解释:如果 myrslt1等于storesthenrslt应该是storesand dead store。指两个论点反对一个论点。
rslt1
stores
rslt
dead store
如果有其他方法请告诉我?
您并没有对上下文过于慷慨,但我认为您的意思是在 WHERE 子句中使用它。
我可能会在这里使用 DECODE(或 CASE),但使用普通过滤器:
select * from your_table where ( ( rslt1 = 'stores' and rslt = 'dead store') or rslt = rslt1 )