Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
wuming79
Creator
Creator

Order by during data loading

Hi,

How do I actually do order by during data loading? 

Reference from https://community.qlik.com/t5/New-to-Qlik-Sense/How-to-sort-data-in-data-load-editor-and-assign-orde...

I tried:

 

 

LOAD datetime,

RESIDENT MyTable

ORDER BY datetime DESC;

 SELECT datetime

FROM MyDB.MyTable

But the following lines were highlighted in red.

 

RESIDENT MyTable

ORDER BY datetime DESC;

 

Labels (2)
4 Replies
tresesco
MVP
MVP

Assuming your MyTable is properly labelled before it is being referred in resident load, you need to remove ',' (comma) after field name in load statement.

 

Otherwise try loading the table from db using SELECT first and then use RESIDENT load like:

MyTable:

Select ... from <>;

NoConcatenate

Final:

Load ... Resident MyTable Order By <Field> Desc;

Drop table MyTable;

nasirsaikh
Creator
Creator

Qlik only allowing order clause in Resident only

wuming79
Creator
Creator
Author

Hi,

I did the following but qliksense gave the error  "Table 'OV_stati' not found"

[MyTable]:
LOAD data AS data1, 
timestamp AS timestamp, 
timestamp((timestamp/86400 + 25569 + 8/24),'DD/MM/YYYY h:mm:ss[.fff] TT') as datetime,

Resident [MyTable]
ORDER BY datetimeDESC;

SELECT `data `, 
`timestamp`, 
`datetime`, 

FROM MyDB`MyTable`;
timpoismans
Specialist
Specialist

When doing a Resident load, always at a "NoConcatenate" to the load. Else you risk the table getting auto-concatenated to the one it's being loaded from.

 

Regards,

Tim P.