Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
After joining two table with outer join, I need to create a new column (collumn 3) that copies another one (column1) but replace all the null values in (column1) with values in (column2).
My code looks something like:
Table1:
Load Name,
Column1
From
[location1];
Outer Join(table1)
Load Name,
Subname,
Column2
From
[location1];
Table3:
Load Column1
Column2
If(IsNull(Column2), Column1, Column2) as Column3
Resident Table1;
I get the correct result when Column2 is not null, but when it is null I get null and not Column2.
Screenshot:
Any suggenstions?
Try with this in place of the IsNull()
Len(Trim(Column2))= 0
Great thanks!