4 Replies Latest reply: Apr 25, 2014 4:16 PM by Vamshi Tataipelli RSS

    Having issue working with nulls

    Matt Maino

      Hi everyone,

       

      I have imported a field from a SQL database that contains nulls. I would like to assign a name to a new field based off of whether or not my original field is null or contains a value. This seems like a simple problem to solve using this code:

       

      if(IsNull(field), 'string', 'string2') as field2

       

      However, for some reason I'm getting the string2 in field2 for rows that have a null for field. Does anybody have an idea of why this is happening - or have a better way of accomplishing this bit of logic?

       

      Thanks