Hi All,
I have data like this and used nvl with using parameter , but it is not populating both records if am not passing p_vendor.
vendor column has null value for 1111 for serial_num.
with xxc_test
as
(select null vendor, '1111' serial_num from dual
union all
select 'ABC' vendor, '2222' serial_num from dual
)
select * from xxc_test
where 1=1
and vendor=nvl(:p_vendor,vendor)
and to_char(serial_num) in('2222','1111')