3 Replies Latest reply: Jul 9, 2018 9:06 AM by Глеб Аитов RSS

    load first occurance of the row

    Глеб Аитов

      Hi,

       

      I have a table, which a want to tranform based on the first occurence of the OrderN (see below):

      Screenshot_1.jpg

       

      The script:

       

      OrderTMP:

      NoConcatenate


      LOAD

       

       

          ДатаIx,

          OrderN,

           channel

                   

      RESIDENT [Main_table]

      Where status='order-created'  // status exists in the main table, so i filter out certain records by this field value

      order by [ДатаIx] asc

      ;



      OrderTMP:

      NoConcatenate


      LOAD *

      RESIDENT OrderTMP

      WHERE NOT EXISTS (OrderN);


      DROP FIELD [ДатаIx] FROM OrderTMP;



      The result is that both orders 555 exist.


      Where is the error?