Oracle DB LMLEASE TERMINATE_DATE IS NULL how to query null

 1 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
amylynanderson
Advanced Member
Posts: 26
Advanced Member
    How do I query null values of a date?

    SELECT BB.COMPANY, BB.LEASE, BB.END_DATE, BB.TERMINATE_DATE, AA.DUE_DATE, MAX(AA.PMT_NBR) FROM  LMPAYDTL AA,  LMLEASE BB WHERE AA.COMPANY = BB.COMPANY AND AA.LEASE = BB.LEASE AND BB.R_STATUS = 1 AND BB.COMPANY =    AND BB.TERMINATE_DATE = '1700-01-01' GROUP BY BB.COMPANY, BB.LEASE, BB.END_DATE, BB.TERMINATE_DATE, AA.DUE_DATE
    mjuusola
    New Member
    Posts: 1
    New Member
      Use the TO_CHAR function.

      TO_CHAR(BB.TERMINATE_DATE ,'YYYYMMDD')='17000101'