4 Replies Latest reply: Jun 6, 2016 10:03 AM by Stefan Wühl RSS

    Order By does not impact Distinct Load.

    Ankit Goyal

      Hi,

       

      PFA the test data (a single column) that is not getting sorted when we write the following code:

       

      D:

       

      LOAD x

      FROM

      [..\..\..\..\..\..\Downloads\TestData.xls]

      (biff, embedded labels, table is Sheet1$);

      NoConcatenate

      load distinct * Resident D

      Order by x;

      drop Table D;

      Output:

      Inline image 1

      I know that Order By executes before Load. Thus accordingly, Load Distinct should be applied on the sorted column x which should in turn return the sorted Distinct values.

       

      It would be really helpful if you could help me tell why it is not getting sorted.