需要了解下面的sql代码

时间:2018-05-22 05:57:11

标签: sql oracle

Case 

WHEN p_con.pipeline_tx_status in (('CNF'),'OI','ICF','C')
   (p_con.pipeline_tx_status in ('CNF') OR  (p_con.pipeline_tx_status in('OI','ICF','C') AND NVL(MWB_HEADER.ACCOUNTING_STATUS,'O') NOT IN ('O'))) 

THEN "CNF"

1 个答案:

答案 0 :(得分:1)

if 
    pipeline_tx_status's value eqauls ('CNF' or 'OI' or 'ICF' or 'C')
    (and? / or?) pipeline_tx_status's value eqauls 'CNF'
    and pipeline_tx_status's value eqauls ('OI' or 'ICF' or 'C') 
    and MWB_HEADER.ACCOUNTING_STATUS not null
then the value return "CNF"

ps.p_con,MWB_HEADER are your table varible

你必须知道以下这些知识

SQL IN Operator

Oracle / PLSQL: NVL Function