8 Replies Latest reply: Oct 2, 2016 10:40 AM by Igor Aguiar RSS

    IF ERROR behavior during left join in a load

    Igor Aguiar

      Hi all, I would like to know if it is possible to fill a field during a join with a specific value when no correspondence is found.

       

      example:

       

      table1 has:

      key / value

      1 / a

      2 / b

      3 / b

      4 / c

      5 / d

       

      table2 has:

      value / category

      a / beer

      c / soda

       

      in a simple left join the result would be

      1 / a / beer

      2 / b /

      3 / b /

      4 / c / soda

      5 / d /

       

      how can I fill the empty lines where no correspondence was found in table2 with something and produce a result like

      1 / a / beer

      2 / b / water

      3 / b / water

      4 / c / soda

      5 / d / water

       

      ???

       

      tks!!!