I have a query that is filtering using the :CONTRACT_TYPE
. My contract_type contains both nulls and integers.
I cannot seem to deal with the nulls correctly, if I do the following, I return 0 results:
WHERE CONTRACT_TYPE = NVL(:CONTRACT_TYPE, CONTRACT_TYPE)
I get the results I want when I simply do:
WHERE CONTRACT_TYPE is null
I want to be able to pass in the :CONTRACT_TYPE
with both NULLS and integers.
Thanks all :)