WHERE
--from TABLE.PARAMETER1
(b.is_ot_paycode = 'Y' OR
-- from variableA
b.is_ot_paycode = 'Y')
AND
-- from TABLE.PARAMETER1
(b.is_wh_paycode = 'Y' OR
-- from variableA
b.is_wh_paycode = 'Y')
-- from variableB
AND b.is_ot_paycode = 'Y'
如何CASE
在我的WHERE
子句中创建一个语句,当
b.is_wh_paycode = 'Y' (from variableA) and
b.is_ot_paycode = 'Y'(from variableB)
b.is_wh_paycode (from TABLE.PARAMETER1) would always be equal to 'N'?