SELECT myTable.*, myTable.startTime-T.endTime as TimeDiff
FROM myTable INNER JOIN myTable AS T ON myTable.Location=T.Location
WHERE T.StartTime=(SELECT MAX(StartTime) FROM myTable as Tmp WHERE StartTime<myTable.StartTime And Location=myTable.Location)
ORDER BY myTable.StartTime
value would be End_time of present record minus End_time of present record.
value would be End_time of present record minus End_time of present record
I would appreciate if i can have an early solution to my problem.
Yeah - I work half the night to come up with a solution - and then - nothingI would appreciate if i can have an early solution to my problem.
I also have a hectic work commitment so with regardsdue to my hectic work commitment
refer to thisI tried your sql code but couldn't achieve the desired results
and change thishowever the sql finds the previous record (aliased as T) so the difference calculation is easily changed
SELECT myTable.*, myTable.startTime-T.endTime as TimeDiff
sorry all.
due to my hectic work commitment i didnt have time to go through your suggestion. I will try your suggestion/ codes the moment i m free. plz hold down a while...
Come on guys lighten up, yes the poster is very remiss to say the need is urgent and then not spend the time to reply ASAP and to test the answers immediately even if it means working all hours. The tone of his posts suggests that he is young or English is not his first language.
What his requirement is is obvious in his first post not withstanding his written error so let's not make mountains out of mole hills.
Why haven't I replied ? ,because I no longer have Access to test any air code I might be foolish enough to try, but CJ seems to have it covered if the poster would make the effort to understand it.
Brian
Your required solution has already been provided.please try and work out the solution to my query as and when your priority work is fulfilled
all you have to do is substitute the bit in red with your formularefer to this
Quote:
however the sql finds the previous record (aliased as T) so the difference calculation is easily changed
and change this
Quote:
SELECT myTable.*, myTable.startTime-T.endTime as TimeDiff