sort table by date descending (the most recent is first in the table)
Loop at table where field 1 <> 0.
move what ever you want to work area.
EXIT.
endloop.
loop at table where field 2 <> 0.
move stuff to work area.
EXIT.
endloop
etcetera
Append work area to table.
or write work area.