It shouldn't be too hard. You just have to add an "Order By" clause to the end of the sql string and then search again.