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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
dusasuman
Creator
Creator

Load order

Hi Community,

I am loading one table in Ascending order based on two fields UnitNumber and Activity date to perform few calculations. But the same Unit number will have 2 or more Activity dates for these records i need load by its original load order.

Is it possible to load a table by load order at this instance.?

Please help me with your suggestions..

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

You might want to add a sequence number field to the table during the original load, then use this sequence number to sort by the original load order:

     LOAD ....

          ...

          RowNo() as SequenceID,

          ...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
dusasuman
Creator
Creator
Author

Hi Jonathan..

Thanks for your suggestion.. But i am loading Unit Number and Activity date in Desc order,, when multiple records occurs at same Unit Number and same Activity Date the i Need to load by ascending order of Sequence ID.. Is it possible to load by combination of Asc and Desc order?

jonathandienst
Partner - Champion III
Partner - Champion III

ORDER BY UnitNumber asc, ActivityDate asc, SequenceID desc

(Asc is the default direction , it can be omitted - and usually is)

ORDER BY UnitNumber, ActivityDate, SequenceID desc

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
dusasuman
Creator
Creator
Author

At that instance it is not considering order of SequenceID.. It is Just ignoring order of SequenceID..

Not sure what happening with load order..

Thnaks...