2 Replies Latest reply: Jan 19, 2016 12:53 PM by Massimo Grossi RSS

    One Field filled with two tables

      Hi,

       

      I have to fill the field "Client" of a table like this:

       

      KeySub KeyClient
      1232409312054521
      1232409311505012
      1232409312506543
      7245612382602546
      7245612381251202
      8765462111236549

       

      Where 1 Key can have n Sub Keys. My source tables are something like this:

       

      KeyClient
      123240931Client A
      724561238Client C

       

      Sub KeyClient
      1236549Client D

       

      So my result is:

       

      KeySub KeyClient
      1232409312054521Client A
      1232409311505012Client A
      1232409312506543Client A
      7245612382602546Client C
      7245612381251202Client C
      8765462111236549

      Client D

       

      So for each row i have to check if the Key or the Sub Key have a Client associated (i know beforehand that there are no cases where both conditions are true at the same time)

       

      Thank you and sorry for my english.