I think you need a more complete example with the output you expect to get better help. Although I do understand what you're getting at.
Mike -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Clemens Ladisch Sent: Thursday, April 11, 2013 8:39 AM To: [email protected] Subject: Re: [sqlite] correlated subquery in LIMIT/OFFSET? Michael Black wrote: > > However, it appears that SQLite does not allow correlated subqueries > > in the LIMIT/OFFSET clauses of a scalar subquery: > > > > sqlite> create table t(x); > > sqlite> select (select 42 limit 1 offset (select t.x)) from t; > > Error: no such column: t.x > > Instead of "select t.x" don't you really want "select x from t" ?? No, I want it to be a *correlated* subquery. > I assume you just want the offset to come from a single-row table? It should come (or be derived) from the current row in the outer query. Regards, Clemens _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

