oracle nvl

SELECT h.location_id, h.location_code, h.cust_province
  FROM apps.cop_customer_header_v h
WHERE nvl(h.location_id,-1) IN (-1)
 --WHERE  h.location_id IN (1,2,3) OR h.location_id IS NULL

 

SELECT *
  FROM cop_location_auth
 WHERE person_id = 8745
      --AND location_id=4
   AND SYSDATE BETWEEN NVL(start_date, SYSDATE - 1) AND
       NVL(end_date, SYSDATE + 1)

posted @ 2016-11-11 17:48  albert_think  阅读(120)  评论(0编辑  收藏  举报