i have two credit bureau we are using 1 for applicant and another for co-applicant , we are giving different customer ID to each, each record captured there own date so i want to display customer ID and date from both bureau which are available in one table column1 and column2 i want to show both details like below
CodePudding user response:
select t.cid,t.col1 from t where col1 is not null
union all
select t.cid,t.col2 from t where col2 is not null;
CodePudding user response:
select id,
case when col1 is not null then col1 else col2 end,
col1 is not null as 'just_check'
from t