1 Reply Latest reply: Mar 13, 2018 12:43 PM by Massimo Grossi RSS

    limit load of 2 files

    amine haddar






      LOAD *,$(DATE_S) AS DATE

      FROM '..\'CLIENT.qvd'(qvd);


      for i=2 to $(a)

          let DATE_SITUATION = FieldValue('DATE', $(i));



                 * $(DATE_S) AS DATE  FROM 'CLIENT2.qvd'(qvd);



      The objective is to have 5000 customers from the first file, and 5000 from the second one.

      And it is necessary to concatenate the tables.


      Any suggestions please?


      I used rowNo() > 5000 and the result is 5000 customers from the first file.

        • Re: limit load of 2 files
          Massimo Grossi

          try with first 5000


          This is from Qlik help

          The First prefix to a Load or Select (SQL) statement is used for loading just a set maximum number of records from the data source, regardless of its length.

          The syntax is:

          first n ( loadstatement | selectstatement )


          n is an arbitrary expression which evaluates to an integer indicating the maximum number of records to be read.


          First 10 LOAD * FROM abc.csv;

          First (1) SQL SELECT * FROM Orders; (Note: The parenthesis is allowed but not required.)