View Full Version : noob need help, comparing 2 records from same field


Neoh
08-12-2005, 01:20 AM
Hello everyone,

I'm quite new to access (used to php mostly) and for usual task it's ok but now I have trouble for a quite simple query I think.

I have to compare the values from 1 field and select only the rows just before the value becomes smaller and also the very last row.

example:
if I have a row with 1, 2, 3, 4, 1, 2, 3, 4, 5, 1
I need to put 4 and 5 in an other table

Neoh
08-12-2005, 07:48 AM
I might be on something:
actually the field is a date format (00:00:00) and there is always 4 seconds more in the next row except if the person hung up so i can try to find every row where if 4 seconds added doesn't match. But i still am lost on how to do that. I tried that:
SELECT Rawdata.CallDuration, Rawdata.CallerId, Rawdata.CallStartDate, Rawdata.CallStartTime, *
FROM Rawdata
WHERE (((Rawdata.CallDuration)>[Rawdata]![CallDuration]+4));

but of course it doesn't work

here is a db row:
CallerId CallStartDate CallStartTime CallDuration ID
81 19/07/2005 10:45:14 0:25:38 1