2 Replies Latest reply: Jan 13, 2012 9:36 AM by Viggo Stenseth RSS

    Exists on Subfield or Alias

      Hi everyone,

       

      I am trying to use Exists to exclude results that exists in the Excelfile i am loading but doesn´t in the previously loaded SQL tables.

      OrderID is the key. However it loads OrderID´s that has not previously been loaded.

       

      I tried to use exsists in the first load to no avail. Happy for any input!

      I.e Exists(OrderID) or Exists(Subfield([Master Reference], ., 1) AS OrderID) doesn´t work

       

       MAINFILE:
      REPLACE LOAD  
            SubField([Master Reference], ., 1) AS OrderID
         
      FROM[Mainfile.xls]
      ;
      FINALFILE:
      NoConcatenate LOAD  
            OrderID 
      Resident MAINFILE
      Where Exists(OrderID)
      ;
      DROP  Table MAINFILE
      ;