Hi, I am trying to SELECT records from 2 tables. I want to get records WHERE TABLE2_TERM_DATE is NULL unless the TABLE2_CONTACT field is NOT NULL. If the TABLE2_CONTACT is NULL and TABLE2_TERM_DATE is Null then I don't want those records. Below is the code I have so far, any help would be appreciated.
SELECT *
FROM TABLE1, TABEL2
WHERE TABLE1_ID = TABLE2_ID
AND TABLE2_TERM_DATE is NULL and TABLE1_CHANGE_IND is NULL
AND TABLE1_ACTIVITY_DATE >= '01-MAY-05'
ORDER BY TABLE1_LAST_NAME, TABLE1_FIRST_NAME, TABLE1_MI, TABLE1_ID
SELECT *
FROM TABLE1, TABEL2
WHERE TABLE1_ID = TABLE2_ID
AND TABLE2_TERM_DATE is NULL and TABLE1_CHANGE_IND is NULL
AND TABLE1_ACTIVITY_DATE >= '01-MAY-05'
ORDER BY TABLE1_LAST_NAME, TABLE1_FIRST_NAME, TABLE1_MI, TABLE1_ID