Previous Row

Myriad_Rocker

Questioning Reality
Local time
Today, 14:32
Joined
Mar 26, 2004
Messages
166
Is there an easy way to pull previous row? Let's say you had a table of personal information. I want to keep historical data but I also want to be able to pull this historical data. The effective date of the row could be anything so it is an unknown. I can get the most recent row...so how do I get the previous row from that?
 
I'm not really looking to return a specific value from a row...I want to return the entire previous row. Also, there aren't any auto number values used. It's just an employee id and it skips around....it doesn't go in a sequencial number order. So, I can't really use the +1 or -1 thing.
 
I think you can do this by making a top 2 query and then reversing the order and making a top 1 query. But I've never needed to do this, so that's as far as I can go.
 

Users who are viewing this thread

Back
Top Bottom