fimaro
09-10-2008, 04:00 AM
I've been scratching my head over this problem. Tried searching for a similar problem, but I can't seem to find one. So here it is:
I have a table with 3 columns (timestamp, data1, data2)
I want to select timestamp, data1 and data2 where timestamp is between 'now' and 'then', but where data2 is the result of timestamp between 'now + 1 seconds' and 'then + 1 seconds'.
In other words, data1 is from 13:00 - 13:01, but data2 is from 13:01 - 13:02 if that makes any sence.
I thought it would be a simple query, but I just can't figure out how to do it ;-\
Any help or pointers as to how to solve this?
I have a table with 3 columns (timestamp, data1, data2)
I want to select timestamp, data1 and data2 where timestamp is between 'now' and 'then', but where data2 is the result of timestamp between 'now + 1 seconds' and 'then + 1 seconds'.
In other words, data1 is from 13:00 - 13:01, but data2 is from 13:01 - 13:02 if that makes any sence.
I thought it would be a simple query, but I just can't figure out how to do it ;-\
Any help or pointers as to how to solve this?