5 Replies Latest reply: Jan 24, 2017 3:56 AM by Alberto Almagioni RSS

    If condition to give value to a new field

    Alberto Almagioni

      I have a table like this:

       

      NationNameANameB
      ITabc
      ITdefdef
      FRa2d123
      FR456

       

      I need to have this result

      newname
      abc
      def
      123
      456

       

      I try with

       

      LOAD *,

           if("Nation" <> 'IT', NameB, NameA) as newname;   

       

      And also  with

      LOAD *,

           if("Nation" = 'IT', NameA, NameB) as newname;   

       

      But in newname field I find only value form NameB  (case1) or form NameA (case 2).

      I don't know why.

      Thank you

      A