Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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..
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,
...
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?
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
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...