On Tue, Jun 7, 2011 at 5:44 PM, Guenther Brunthaler <gb_about_...@gmx.net>wrote:
> Hi all, > > I frequently need a table in my queries for several kinds of JOIN > operations which contains just the integers from 1 to N in its rows. > > I. e. > > SELECT n FROM int_seq where n <= 5; > 1 > 2 > 3 > 4 > 5 > > However, I would like to achieve the same effect without actually > creating such a table "int_seq". > > It it possible in SQLite to create such a table implicitly "on the fly" > using some sort of recursive view/query or built-in special function? > See http://www.sqlite.org/src/artifact/6129adfbe7c7444f2e60cc785927f3aa74e12290for an example implementation of a virtual table that does something pretty much like the above. We've recently started using it some for our test cases. > > Regards, > > Guenther > _______________________________________________ > 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