Query data ?

hyp527

Registered User.
Local time
Today, 08:04
Joined
Jan 17, 2009
Messages
27
For example: i have only 1 table

tblMainTable
-mainID
-Date
-Wages

how do i used this data to query the prev wage and prev date of the next consecutive wage and date? (I want to query the prev.date and prev.wage column to see the pattern in change) . Should i break this data into 2 queries and do a comparison? Not sure how this will work.

example: tblMainTable

mainID date wages prev.date? prev.wages?
123 1/1/2009 $12 --- ----
123 1/6/2009 $2.0 1/1/2009 $12
123 1/7/2009 $12.05 1/6/2009 $2.0
123 1/12/2009 $1.05 1/7/2009 $12.05

Thanks.
 

Users who are viewing this thread

Back
Top Bottom