On Mon, Jun 16, 2014 at 7:46 AM, Simon Slavin <[email protected]> wrote:
> > > On 16 Jun 2014, at 12:36pm, Richard Hipp <[email protected]> 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 > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

