Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

order by doesn't work

Hi!

if i do


load time,number

resident table

order by time;

(time is numeric)

my table doesn't order by time but it is oder randomly.

13 Replies
swuehl
MVP
MVP

When you say "my table", do you refer to the table you could look at in table viewer or do you create a chart table object using fields time and number?

If second, I guess the sort order for those fields within the object is not set to load order of field time, but something different.

Not applicable
Author

i refer to the table i could look at in table viewer

swuehl
MVP
MVP

Could it be that you get a concatenation to a table with fields time and number (maybe table "table"?) and you are still looking at the original order of table "table" (table view will only show you the start of the table)? Try a NOCONCATENATE LOAD then, using a label for your new table and a drop the first table (or rename the fields).

Not applicable
Author

I already use NOCONCATENATE

swuehl
MVP
MVP

Could you post a small sample here (upload availabe in advanced editor)? Or your script?

Not applicable
Author

of course!

DDSEvent_Signal2:

LOAD 

     VehicleName,

     VehiclesKey,  

     EventId,

     ProcessId,

     StartTime,

     EndTime,

     MCGFileNameId, 

     EnvironmentSignalGuid,

     central_sample

from ./file.qvd(qvd);

DDSEvent_Signal:

QUALIFY*;

UNQUALIFY VehiclesKey,MCGFileNameId,DiagnosticConfigurationId/*,DDSEventId*/,EnvironmentSignalGuid/*,central_sample*/,VHLKey,StartTime;

NoConcatenate

LOAD 

     VehicleName,

     VehiclesKey,  

     EventId,

     ProcessId,

     StartTime,

     EndTime,

     MCGFileNameId, 

     EnvironmentSignalGuid,

     central_sample

resident DDSEvent_Signal2

Order By StartTime;

drop Table DDSEvent_Signal2;

swuehl
MVP
MVP

Are you doing something later on in your script with this table?

Have you tried not using the Qualify / Unqualify (just exiting the script after the second load, just for a test)?

Could you give an example of how your table looks like not correctly ordered?

It is probably be helpful if you could post a small sample, if you don't want to post confidential data, maybe you can use mock up data or scramble it.

Not applicable
Author

attached below my startTime column order by load order

Thanks!

swuehl
MVP
MVP

Thanks, that's what I call a big example

But I was more after a sample of your input data (qvd) and your complete script (maybe just a little qvw sample?).

Honestly, I still don't know why you don't get an ordered startTime field. I would try and keep the codes as simple as possible to see what's going on.