Hi,
I am trying to exclude rows of data that include the word 'Dispute' in a certain column. I tried it two ways and both ways are excluding my nulls in that column for some reason. Does not contain '%Dispute%' and not in 'Dispute' both pull my data but exclude the null results as well, I need them to be included. How do I do that? Id prefer to do this through my in db code rather than a filter tool. When I tried:
where BCV_SGMNT = 'Enterprise'
and FIN_CLNDR_YRMN between 202306 and 202310 and ADJ_DESCRIPTION not like '%Dispute%' or ADJ_DESCRIPTION is null
it grabbed other dates as well, which I dont want. So what's my solution here then (to exclude Dispute while still keeping the nulls, and not using a filter tool)?
In SQL, you need to wrap the OR condition in ()
Something like
where BCV_SGMNT = 'Enterprise'
and FIN_CLNDR_YRMN between 202306 and 202310 and (ADJ_DESCRIPTION not like '%Dispute%' or ADJ_DESCRIPTION is null)

