Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Order by with where

I have a resident table, and a condition that only works correctly with order by.

But i also need to drop the results that don't satisfy the condition.

How can i do this, once it's not possible to use Order by with Where?

1 Solution

Accepted Solutions
Not applicable
Author

Hi, I think it can be easier to see what you are trying to achieve if you could post some sample code, however I will take my chances without further information, so you may try something like this:

//Here you order the table in the needed way

Temp:

Load yourfields

resident table

order by A;

//Here you apply the condition and keep only those records of interest

Fact:

noconcateante

Load yourfields

resident temp

where yourcondition;

//clean up the ordered table

drop table Temp;

Regards

View solution in original post

2 Replies
Not applicable
Author

Hi, I think it can be easier to see what you are trying to achieve if you could post some sample code, however I will take my chances without further information, so you may try something like this:

//Here you order the table in the needed way

Temp:

Load yourfields

resident table

order by A;

//Here you apply the condition and keep only those records of interest

Fact:

noconcateante

Load yourfields

resident temp

where yourcondition;

//clean up the ordered table

drop table Temp;

Regards

Not applicable
Author

Yes, that's it

i did like this before but i had forgotten the noconcatenate.

many thanks!