4 Replies Latest reply: Feb 8, 2016 5:37 AM by Sunny Talwar RSS

    Lookup value from another table

    Filip Larsson

      Hi there,

       

      I have what I think is a common question.

      Simplified: I have two tables and want to pick/lookup/peek a value from TableA to TableB when scripting. I have a key. I have read about the functions but can't get which one to use and how to use them.

       

      TableA


      KeyValue
      1b
      2c
      3d

       

      I tried this...

       

      TableB:
      LOAD
           Field1 As MyKey,
           Lookup(Value, Key, MyKey, TableA) As ValueFromTableB
           Field3 ...
      FROM MySource
      

       

       

      I would like to accomplish a load where I can get the value from table B depending on which key I have in the current record from MySource.

       

      Thanks in advance for your help!

       

      Best,

      Filip