4 Replies Latest reply: Sep 17, 2010 8:00 AM by ondera RSS

    Load Order by

      not working properly.
      not order the table.

      can you help me?

      temp1:
      LOAD * INLINE [
      Name, Sales
      A,20
      B, 10
      C,45
      D,20
      E, 21
      F,32
      G,200
      ];

      temp:
      noconcatenate Load
      Name,sum(Sales) as Sales
      Resident temp1
      group by Name
      Order by Sales desc,Name;
      Drop Table temp1;

        • Load Order by

          Hi AndreaPeretti,

          I can't find 'Order desc' field ......

           

          Order by Sales desc,Name;

           

          Anyway, you can sort data in chart level also.........

          Regards,

          Nilupa

          • Load Order by
            s j

            order by is a clause used for sorting the records of a resident input table before they are processed by the load statement. The resident table can be sorted by one or more fields in ascending or descending order. The sorting is made primarily by numeric value and secondarily by national ASCII value. This clause may only be used when the data source is a resident table.

            field specifies which field the resident table is sorted by. The field can be specified by its name or by its number in the resident table (the first field is number 1).

            sortorder is either asc for ascending or desc for descending. If no sortorder is specified, asc is assumed.

            Note: If no source of data is given by means of a from, inline, resident or autogenerate clause, data will be loaded from the result of the immediately succeeding select or load statement. The succeeding statement should not have a prefix.

            • Load Order by
              ondera

              it is working properly you couldnt see that Beacuse you are probably trying to see that effect on the table box or another object.

              QlikView automatically analyzing your data and decide automatically what kind sorting is suitable also you can change ...

              if you really want to trust that statements you should try that script and then sort by X . Im just giving recno so first value shoul be 200 ... ;

               


              temp1:
              LOAD * INLINE [
              Name, Sales
              A,20
              B, 10
              C,45
              D,20
              E, 21
              F,32
              G,200
              ];

              temp:
              noconcatenate Load *,recNo() as X
              Resident temp1
              Order by Sales desc,Name;
              Drop Table temp1;


              Output :

               

               

              NameSalesX
              G2001
              C452
              F323
              E214
              A205
              D206
              B107