10 Replies Latest reply: Jan 23, 2018 5:30 AM by Mei Zheng Tay RSS

    Concat 2 tables and check if fieldX=A and fieldX=B for each item

    Mei Zheng Tay

      Hi,

       

      I have a table as shown below. XXX is not unique.

      Untitled.png

      Right now it is displayed as below. I would like to show either 'ABC', 'DEF' (if it exists in only one of the respective table) or 'ABC and DEF' (if it exists in both tables) for "type" in the final table. Meaning I would like to show 'HIPS and NIPS' instead of showing the cartesian product(?).

      screenshot.PNG

       

      Thought of doing an ApplyMap to the temporary ABC or DEF tables to determine the "type"

      something like this logic:

           if ApplyMap to 'ABC' not null => 'ABC',

           else if ApplyMap to 'DEF' not null => 'DEF',

           else if ApplyMap to 'ABC' and to 'DEF' not null => 'ABC & DEF'

           else 'N/A'

       

      Is there a better way of achieving my desired results?

       

      Update:

      This is my codes for the final table

      CVE:

      Load

      nipsName as CVE.Name,

          nipsCVE as CVE,

          sigFrom

      Resident nipsCVE;

      Concatenate

      Load

      hipsName as CVE.Name,

          hipsCVE as CVE,

          sigFrom

      Resident hipsCVE;

       

      Thanks and regards,

      Serena