Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
leomathew
New Contributor III

Load. concatenate two excel and get a sorted output?

Hi guys,

i have two excel with same structure. i want to load and concatenate them in such a way that the output should be sorted by 1st column (SNO).

Can anyone suggest me the simplest way to achieve it?

Thnx

Tags (2)
2 Replies

Re: Load. concatenate two excel and get a sorted output?

If the two excel tables have exactly the same number of fields and exactly the same names then the data will be appended into one table automatically. If that doesn't happen add a concatenate statement to the second load:

T1:

load * from ...excelfile1...;

concatenate(T1)

load * from ...excelfile2...;

You can specify a sort order for most charts. See the Sort tab of the objects properties window. If you feel that you must do the ordering in the script then you need an additional resident load to sort the table:

T2:

load * resident T1

order by SNO;

drop table T1;


talk is cheap, supply exceeds demand
leomathew
New Contributor III

Re: Load. concatenate two excel and get a sorted output?

Hi Gysbert,

thanks for your reply. But i was wondering if we can do it in a single step? is it possible to concatenate and sort both files in one step and avoid creation of T2

Community Browser