Orace - CASE ... WHEN IN等语法

时间:2015-10-29 12:18:12

标签: sql oracle case

我想做这样的事情(伪代码):

select case myFunction(someField) when in ('val1', 'val2', 'val3') then 'Option1' 
when someOtherField = 'Val4' then 'Option2' else null end as someColumn

1 个答案:

答案 0 :(得分:1)

var variable1 = values.TakeOrDefault(0); //getting first element or default
var variable2 = values.TakeOrDefault(1); //getting second element or default