如何在where
子句下将此代码编写为case
语句?
IF trim$(ps_status) <> "" AND NOT isnull(ps_status) THEN
SELECT CASE ps_status
CASE 'O'
p_con.pipeline_tx_status = 'O'
CASE 'MFT'
p_con.pipeline_tx_status = 'MFT'
CASE 'IS'
p_con.pipeline_tx_status = 'IS'
CASE 'CNF'
(p_con.pipeline_tx_status in ('CNF') OR (p_con.pipeline_tx_status in('OI','ICF','C') AND NVL(CONSOL.ACCOUNTING_STATUS,'O') NOT IN ('O')))
CASE 'OI'
p_con.pipeline_tx_status = 'OI'
CASE 'ICF'
p_con.pipeline_tx_status = 'ICF'
CASE 'C'
p_con.pipeline_tx_status = 'C'
END SELECT
END IF