7 Replies Latest reply: Feb 15, 2017 12:40 PM by Андрей Шепель RSS

    Strange result in script sorting

    Андрей Шепель

      Colleagues, good day!

      Working in QV script with order by operator show me some strange result when i try concat several fields.

       

      I have one table:

       

      Field1Field2Field3Field4
      11A3
      22B5
      13B4
      24B3
      15B4
      46D4
      17D4
      11A3
      22B5
      13B4
      44f3
      15s4
      46D4
      17D4

       

      And i need to get final result by concat:

       

      Test:

      LOAD *

        

      FROM

      Sorting.xlsx

      (ooxml, embedded labels, table is Лист1);

       

      test2:

      load

       

       

      Field1&Field2&Field3&Field4

      Resident Test Order by Field3, Field2, Field1;

      DROP Table Test;

       

      Result table must be:

       

       

      11A3
      11A3
      22B5
      22B5
      13B4
      13B4
      24B3
      15B4
      46D4
      46D4
      17D4
      17D4
      44f3
      15s4

       

      Could anyone explain why sorting operator works so strangely?

      Thanks.