I have two tables that I'm joining using left outer joins that have duplicate fields, but I only want to output these fields in one output field.
example;
select
c.field_name,
name_out =
case when a.name is not null then a.name
when b.name is not null then b.name
end
from
table_name c
left outer join
table_name a
on c.id = a.id
left outer join
table_name b
on c.id = b.id
Is this correct logic and does anyone see any problem with it?
example;
select
c.field_name,
name_out =
case when a.name is not null then a.name
when b.name is not null then b.name
end
from
table_name c
left outer join
table_name a
on c.id = a.id
left outer join
table_name b
on c.id = b.id
Is this correct logic and does anyone see any problem with it?