Correction for the issue in data model:
SELECT PARTY_ID FROM HZ_PARTIES WHERE (PARTY_ID IN NVL(:PARMPARTY_ID, party_id)) Replace the NVL with COALESCE and use the below SQL Statement: SELECT PARTY_ID FROM HZ_PARTIES WHERE (COALESCE(null, :PARMPARTY_ID) is null) OR (party_id IN (:PARMPARTY_ID))