I have two tables and joining them using full outer join.
Tab1:
Crossswalk | Ind | name |
---|---|---|
123 | Y | abc |
Tab2:
Crosswalk | Ind | name |
---|---|---|
123 | Null | abc |
123 | Null | bcd |
select coalesce(a.crosswalk,b.crosswalk), a.Ind, coalesce(a.name,b.name)
from Tab1 a
full join Tab2 b on a.crosswalk = b.crosswalk and a.name = b.name
I am getting result as
Crosswalk | Ind | name |
---|---|---|
123 | Y | abc |
123 | Null | bcd |
I want indicator field to populated with Y for both the rows as below.
Crosswalk | Ind | name |
---|---|---|
123 | Y | abc |
123 | Y | bcd |
this is a sample record. I have more records and Ind field should always populated with the Ind value from Tab1