Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Creator III
Creator III

Preceding load and Resident load

Hello everyone,

 

I am stuck on below :-

Data:

Load * where not isnull(tag_TrolleyID_mold);
Load *, Previous(tag_TrolleyID_paint1) as tag_TrolleyID_paint;

LOAD *,
IF( "tag_Color" = 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_mold,
IF( "tag_Color" <> 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_paint1

From....

 

I want to add sort the feild 'tag_TrolleyID_mold'  using order by .

Since, i used preceding load, i cannot apply sort as it will need resident condition.

Can anyone please help me ?

I am not sure if we can apply preceding load and resident load at the same time.

Please help !!!

 

Thank You

 

 

 

1 Solution

Accepted Solutions
Or
MVP
MVP

Why use a preceding load at all? It might be slightly cleaner to look at, but it doesn't actually make a difference as far as I know. You can easily use Resident here, though:

TempTable:

Load *, Previous(tag_TrolleyID_paint1) as tag_TrolleyID_paint;

LOAD *,
IF( "tag_Color" = 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_mold,
IF( "tag_Color" <> 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_paint1

From....;

FinalTable:

NoConcatenate load *

Resident TempTable

WHERE not isnull(tag_TrolleyID_mold)

ORDER BY tag_TrolleyID_mold;

Drop table TempTable;

View solution in original post

1 Reply
Or
MVP
MVP

Why use a preceding load at all? It might be slightly cleaner to look at, but it doesn't actually make a difference as far as I know. You can easily use Resident here, though:

TempTable:

Load *, Previous(tag_TrolleyID_paint1) as tag_TrolleyID_paint;

LOAD *,
IF( "tag_Color" = 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_mold,
IF( "tag_Color" <> 'NULL', "tag_TrolleyID" ) as tag_TrolleyID_paint1

From....;

FinalTable:

NoConcatenate load *

Resident TempTable

WHERE not isnull(tag_TrolleyID_mold)

ORDER BY tag_TrolleyID_mold;

Drop table TempTable;