On Mon, Feb 9, 2015 at 6:12 AM, James K. Lowden <jklow...@schemamania.org> wrote:
> > If not, would it be possible too much effort ? > > I'm guessing the answer is No because the prerequisites are missing. > [DD] And that's the crux of it. SQLite has virtual tables, and as such can approximate table functions, but in a very weird and tricky way. Table functions are part of my top-5 wished for extension in SQLite. > > Something like LATERAL (or APPLY in SQL Server) arises around > table-valued functions, which really should be called parameterized > views. You think you'd like to be able to say, > > SELECT S.* > FROM T join F(T.t) as S on T.t < S.x > > where F is some function that produces a table for a scalar/row > input. > > However, perfectly nothing new is really needed to express the idea: > > SELECT S.* > FROM (select F(t) from T) as S > WHERE EXISTS (select 1 from T where S.x > T.t) > Thanks James. That was useful to me. --DD _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users