Alexey Pechnikov wrote: > > I find get only _one_ row. I found correspond timestamp by other questions. I > don't want get more than one row. >
In that case you would be better off to get the rowid of that row using the other questions. Then you can get the row of interest directly using the rowid. You could also use a limit clause to get the first result within a period if it is possible that your query could return more than one. This is really an important question, does your data allow more than one event within the same millisecond period? If so, how do you distinguish them? You should not be linking rows using timestamps, but if you must, it is important to avoid calculations with and conversions to and from floating point. If you retrieve a floating point value from one query and pass it back as a parameter to another query, you should ensure that it remains as double all along the way. double time = sqlite3_column_double(s1, 1); sqlite3_bind_double(s2, 1, time); If you do this, it should be possible to compare these values for floating point equality. Again, I have found it is best to think of events as happening within a (possibly quite small) window of time, rather than at a point in time. The difference is that identifying a point in time requires infinite precision, whereas identifying a period requires finite user defined precision. The window you need may be small but even a millisecond has a beginning and an end. HTH Dennis Cote _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users