Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
brindlogcool
Creator III
Creator III

Sorting

Hi,

I am trying to sort the text in the load script. But is not getting sorted. Added the sample script

 

T:

LOAD * INLINE [
Id, Country
6, India
1, India
2, Austraila
3, England
4, UK
5, USA
]
;

T1:
NoConcatenate
Load
*
Resident T order by Country asc;

Drop Table T;

3 Replies
Anonymous
Not applicable

click sort-text-a-z/z-a

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

That's because the load order of Country is determined by the first load statement. The second table will be ordered by Country so you can use that order for calculations. But the field Country in the in-memory database will still be sorted in the load order of table T1. What you can do is create a new field Country_Temp and later rename it:

T:

LOAD * INLINE [
Id, Country
6, India
1, India
2, Austraila
3, England
4, UK
5, USA
]
;

T1:
NoConcatenate
Load
Id, Country as Country_Temp
Resident T order by Country asc;

Drop Table T;

Rename Field Country_Temp to Country;


talk is cheap, supply exceeds demand
brindlogcool
Creator III
Creator III
Author

Thanks G Wassesnaar,

Really appreciate your response and got the clarification. Since we cannot use the sort by QVD load. I will try out your way and let you know.