So I have a pretty large Oracle SQL query. I want to add the following logic to my where clause, described in pseudocode below. Is it possible? I want to exclude a record if and only if BOTH columnA and columnB are null. If one or the other is null, that’s okay.
IF (pfr.columnA && pfr.columnB != NULL)
exclude record
ELSE
do nothing
I tried the below except from my where clause, but obviously it does not accomplish what I need.
AND (pfr.columnA IS NOT NULL AND pfr.columnB IS NOT NULL)
1 Answer