I have a table that has the following information:
mesID is my identity seed
mesID | ToUser | FromUser | DateTime ------------------------------------- 91 | jason | krissy | 1/18/2013 12:10:23 PM 92 | jason | krissy | 1/18/2013 12:20:38 PM 93 | jason | krissy | 1/18/2013 12:35:14 PM 94 | jason | krissy | 1/18/2013 12:20:38 PM 95 | jason | krissy | 1/18/2013 12:35:14 PM 98 | jason | krissy | 1/18/2013 12:10:23 PM 101 | jason | krissy | 1/18/2013 12:20:38 PM 104 | jason | krissy | 1/18/2013 12:35:14 PM 109 | jason | krissy | 1/18/2013 12:54:11 PM now keep in mind i have over 60 more messages that are lower mesID then 98. What I want to do is get only the last 5 messages, but keep them in the original order from oldest to newest message returned (mesID = 1 obviously would be the oldest).
logically I would think I would just get the top 5 returns and order it by mesID by DESC. Then after the 5 have been returned then re-order them by mesID AESC, but I have no clue how to do this.
So the end result i would get something like...
95 | jason | krissy | 1/18/2013 12:35:14 PM 98 | jason | krissy | 1/18/2013 12:10:23 PM 101 | jason | krissy | 1/18/2013 12:20:38 PM 104 | jason | krissy | 1/18/2013 12:35:14 PM 109 | jason | krissy | 1/18/2013 12:54:11 PM