Hi Gurus,
I need to join tab1 and tab2 using loannbr, userrole1 and userrole2(which can be null).
Basically if userrole1 does not match, we are trying to check userrole2.
We need all rows from tab1 and we need to fetch rfno from tab2.
Is there any solution to this scenario?
I have included the table structure and inserts for your reference.
create table tab1
(loannbr number,
userrole varchar2(25));
insert into tab1 values(100,'DEVELOPER');
insert into tab1 values(200,'QA');
insert into tab1 values(300,'BA');
create table tab2
(loannbr number,
userrole1 varchar2(25),
userrole2 varchar2(25),
rfno number)
INSERT INTO TAB2 VALUES(100,'DEVELOPER', 'DEVELOPER1',1000);