4 Replies Latest reply: Sep 29, 2011 10:45 AM by justynak RSS

    creating new column based on two others

      Dears,

      I have one problem that I am tackling now and no solution serves it right, although probably it is very simple. Maybe you can help?

       

      From two different sources I have two fields [Vendor name] and [Trading partner name] that are already mapped into one table.

      Data looks now like this:

      doc.           Vendor name          Trading partner name

      1                     a                                   

      2                     b

      3                     c

      4                                                           d

      5                                                           e

       

      I would like to get data like this:

      doc.           Vendor name          Trading partner name      Vendor_final

      1                     a                                                                  a

      2                     b                                                                  b

      3                     c                                                                  c

      4                                                           d                            d

      5                                                           e                            e

       

       

      The following solutions do not work for sure:

      if([Trading partner name]='',[Vendor name], [Trading partner name]) as Vendor_final,

      or

       

       

       

       

       

       

       

      if([Trading partner name]<>'' and [Vendor name] ='',[Trading partner name], if([Trading partner name]='' and [Vendor name] <>'',[Vendor name],'vendor not found'))
      as Vendor_final

       

       

      I will be grateful for any tip.

      J.