On Mon, Jun 16, 2014 at 7:46 AM, Simon Slavin <slav...@bigfraud.org> wrote:
> > > On 16 Jun 2014, at 12:36pm, Richard Hipp <d...@sqlite.org> wrote: > > > > Instead of > > > > ... WHERE x BETWEEN ?1 AND ?2 AND x>?3 > > > > Consider using > > > > ... WHERE x BETWEEN max(?1,?3) AND ?2 AND x>?3 > > I suspect Dr Hipp means > > > ... WHERE x BETWEEN max(?1,?3) AND ?2 > That's not quite the same thing. "x BETWEEN ?1 AND ?2" means "x>=?1 AND x<=?2". Now, if x is the INTEGER PRIMARY KEY (and thus is guaranteed to be an integer) you could say: WHERE rowid BETWEEN max(?1,?3+1) AND ?2 > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users