Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey everyone,
When I load a table, there are some null values in a field. I use this field to perform a join. I would like to replace the null values by a string "Unknown" because otherwise I get some trouble with my join.
I have tried :
if( isnull(fieldA), 'Unknown', fieldA ) as FIELD_A,
but it doesn't do what I want.
Any idea ?
Thanks for your help
if ( not len(fieldA) > 0, 'Unknown', fieldA ) as FIELD_A,
Try like:
if(len(fieldA)=0, 'Unknown', fieldA) as Field_A
If(IsNull(fieldA) or Len(Trim(Replace(fieldA,'-','')))=0, 'Unknown',fieldA) as fieldA