Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI
i need to create a column as
where ever A column data is null then i should be getting value of A and if A columns data is not null then i should get A columns data only.
For that i used isnul function but seems it is not bring data what i requeired
can anyone please help here
i used
if(IsNull(A),B,A)
Thanks
May be try this
If(Len(Trim(A)) = 0, B, A) as NewCol
i tried this
If(Len(Trim(A)) = 0, B, A)
but i am not getting 0 value for len(trim(A)) as 0 , i am getting as null so i replaced 0 with null but still for
If(Len(Trim(A)) = 'null', B, A) , i am getting A value where i have value and null where i dont have A value but not B value
A and B have datetime value
Len(Trim(A)) will give a value of 0 when A is null because Len of Null is 0. Does that make sense?
yes, but pratically it is showing null only not brininging out 0
yes, but pratically it is showing null only not brininging out 0
i tried this
If(Len(Trim(A)) = 0, B, A)
but still for
If(Len(Trim(A)) = 0, B, A) , i am getting A value where i have value and null where i dont have A value but not B value
I am not sure I understand what you mean... would you be able to share an example or images?
Is A and B residing in the same table before you do this?
yes A and B relates to same table