"Raphaël KINDT" <[EMAIL PROTECTED]>
wrote in message
news:[EMAIL PROTECTED]
> I use an events table which looks like this:
>
> CREATE TABLE events(
> time REAL NOT NULL,
> detections BLOB);
>
> I want to select all events which have the BIT3 of detections field
> enable between two time.
Something like this perhaps:
select * from events e1
where substr(detections, 1, 1) & 8 and
0 = (
select substr(detections, 1, 1) & 8 from events e2
where e2.time < e1.time
order by time desc limit 1
);
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users