4 Replies Latest reply: Nov 1, 2016 4:44 AM by Chris Walsh RSS

    Concatenate WHERE NOT EXISTS()

    Chris Walsh

      Hi,

       

      I have the following code which works exactly how I want it to, but when I reload the code again, I get the information duplicated. I think I need to put a "WHERE NOT EXISTS" statement in but I can't figure out how to do this.

       

      Here's the code:

       

      TrackerTemp:

      LOAD *

      FROM

      [C:\QlikView Development\qvd\UKOpenOrderTracker.qvd](qvd);

       

      Concatenate(TrackerTemp)

       

      /*Not Made - Due*/

      LOAD *,

          'ukOpenOrdersNot_MadeDue'  & num(today()) & 'UD' as [ID],

          'uk' as Database,

          'UD' as Entity,

          today() as Date,

          'OpenOrders' as AppName,

          'Not Made' as FieldName,

          'Due' as FieldType,   

          sum(if([Status]='Due' and [Category]='Not Made',[Value To Make],'Not Found')) as [Value]

      Resident CustTable;

       

      So I load TrackerTemp, then I get the new information from CustTable and it concatenates the two, but if I get run it again I get duplicate entries.

       

      Thanks

      Chris