retrieving records if no match found
Hi,
I have a requirement to select records , when there is a match and when there is no match. Here is a sample table and data for clarification .
create table test_rec( id number, param1 char(5), param2 char(5), param3 char(10), param4 char(5));
insert into test_rec values( 1, 'cs','dg','usa','north');
insert into test_rec values( 2, 'cs','dg','brazil','south');
insert into test_rec values( 3, 'cs','dg','brazil',null);
insert into test_rec values( 4, 'cs','dg','argentina','west');
insert into test_rec values( 5, 'cs','dg',null,'west');
Requirement is to retrieve the records when
1. If the value for a column ( any of the 4 param columns) is passed, then whichever row matches that criteria , it should be displayed .