0

你好,它可以取值 STATUS = 1 OR STATUS = 0 OR NULL

我该怎么办(如果或案例何时)

谢谢你..

if status = 1
where  ICERIK.ACTIVE='1'

else if status 2
where ICERIK.ACTIVE= '0'

else if STATUS NULL
where ICERIK.ACTIVE in ('1','0')  

OR

IF STATUS=NULL
where ICERIK.ACTIVE in ('1','0') 
ELSE
WHERE ICERIK.ACTIVE=STATUS





PROCEDURE SP_GET_EKSPERTIZ_CONTENT_ARSAID (ARSA_ID IN VARCHAR2,STATUS IN VARCHAR2, CUR_EKSPERTIZ_ICERIK OUT SYS_REFCURSOR) as 

  BEGIN

    OPEN CUR_EKSPERTIZ_CONTENT FOR

    SELECT DISTINCT  ICERIK.*,ARSA.*  
    FROM T_TEM_EKSPERTIZ_ICERIK ICERIK    
     left outer join T_TEM_ARSA ARSA on ICERIK.GAYRIMENKUL_ID = ARSA.ARSA_ID   
     WHERE ICERIK.ACTIVE=STATUS

          AND ICERIK.GAYRIMENKUL_ID IN
             (SELECT *
                FROM TABLE(FN_SPLIT(SP_GET_EKSPERTIZ_CONTENT_ARSAID.ARSA_ID, ',')));


  END SP_GET_EKSPERTIZ_CONTENT_ARSAID;
4

1 回答 1

2
WHERE
((STATUS is null and ICERIK.ACTIVE in ('1','0'))
or (STATUS = '1' and ICERIK.ACTIVE = '1')
or (STATUS = '2' and ICERIK.ACTIVE = '0'))
and ......
于 2013-08-27T08:21:03.417 回答