Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a field which contains the zero values and null values. I need to replace both null to zero and zero to null. Is this possible.
Thanks
Sriram
HI,
Try this way.
Load
if(isnull(Field1),0,Field1) as Field1,
if(Field2 = 0, null(),Field2) as Field2
From xyz;
Regards,
Kaushik Solanki
is it not possible to write the expression in the front end itself.Also both field 1 and field 2 si same field . There is only field which changes needs to be done...
Thanks
Sriram
Hi,
Yes this expressions are for script only.
Why dont you change that in script.
Regards,
Kaushik Solanki
In my case both field 1 and field 2 refers to same field .Whether this can be done.?
Thanks
Sriram
Hi,
Yes you can do it, even though they are same field.
Regards,
Kaushik Solanki
Hi,
Kaushik.solanki shows clearly indicate the solution. Therefore u can use the following to solve your problem.
Load
if(isnull(Field1),0, if(Field1=0,null(),Field1) as Field1
From xyz;
Regards
Thanks very much...