I'm trying to use the BETWEEN function to exclude dates that fall between two parameter dates, but my current code is also excluding NULL occurrences. I have a query that includes account records that may or may not contain a 'Closed Date'. My current code partially works, but I don't want it to exclude NULL records that don't contain a Closed Date at all.
WHERE ta.ROW_PROCESSED_THRU = '20190731'
AND NOT CONVERT (VARCHAR(10),ta.CLOSED_DATE,112) BETWEEN '20190701' AND '20190731'