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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Order By in Load

Hi,

I have the following data.

   

CONFIRMED_ATVLPLAWHO
29.11.201610:05:06007.189.A50529357
29.11.201610:05:06029.149.A50528122
29.11.201610:05:07005.010.A.0250528531
29.11.201610:05:07034.214.A50528440
29.11.201610:05:09008.210.A50523098
29.11.201610:05:10003.195.A50522899
29.11.201610:05:10026.203.A50522392
29.11.201610:05:10035.167.A50529279
29.11.201610:05:10046.131.A.1150523137
29.11.201610:05:11030.025.A.21

50528338

I want to load this data and then sort it.  I need it in the following format.

I want to have the time being sorted Ascending, and because the WHO repeats, it needs to be grouped by WHO.

Example of required result.

   

CONFIRMED_AT  VLPLAWHO
14.12.201607:40:06  009.221.A51623062
14.12.201607:40:25  009.219.A51623062
14.12.201607:40:56  009.211.A51623062
14.12.201607:41:40  009.181.A51623062
14.12.201607:41:59  009.176.A51623062
14.12.201607:42:52  009.160.A51623062
14.12.201607:43:20  009.151.A51623062
14.12.201607:43:59  009.117.A51623062
14.12.201607:45:10  010.071.A.0151623062
14.12.201607:45:59  010.070.A.0151623062
14.12.201607:46:48  010.078.A.0251623062

As can be seen above, Qlikview actually sorts it Ascending according to time, however it does not group all the WHO (OrderNumbers) together.  Can someone please assist?

I have been struggling getting ORDER BY to work correctly.  it seems to Ignore the Sort.

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi , Just had to have the correct sequence in the ORDER BY and have it in a Resident. Thanks.  Solved it right after posting.

PRE:

LOAD VLPLA,

     right(WHO,8) as WHO,

     CONFIRMED_AT

NoConcatenate

Final:

load *

Resident PRE

Order BY WHO desc,CONFIRMED_AT,VLPLA,;

drop table PRE;

View solution in original post

2 Replies
vinieme12
Champion III
Champion III

Order by only works with Resident Load, can you post the script you are using?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Hi , Just had to have the correct sequence in the ORDER BY and have it in a Resident. Thanks.  Solved it right after posting.

PRE:

LOAD VLPLA,

     right(WHO,8) as WHO,

     CONFIRMED_AT

NoConcatenate

Final:

load *

Resident PRE

Order BY WHO desc,CONFIRMED_AT,VLPLA,;

drop table PRE;