Alexey,

This is really great!  Thanks very much for putting the code online.  I will
definitely be using this as a template for returning tables from functions.
Thank you!

Best Regards,

*****************
Michael Janis
[EMAIL PROTECTED]
*****************

On Fri, Aug 15, 2008 at 1:07 AM, Alexey Pechnikov <[EMAIL PROTECTED]>wrote:

> Hello!
>
> I did write yesterday message "Table functions emulation" with description
> of
> function for generating table with integers ranging.
>
>
> create table testrange(rowid);
> select intrange2table (1,10,1,'testrange');
> select * from testrange;
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
>
> В сообщении от Friday 15 August 2008 02:16:56 Michael Janis написал(а):
> > The approach is to construct (and index) a simple one-dimensional table
> > with integers ranging from 1 to some arbitrarily large number (larger
> than
> > the number of rows in your largest table, for example) and then use this
> as
> > a type of "iterator" across the data.
> >
>
> ...
>
> > sqlite>create table iterator(i int);
> >
> > sqlite>insert into iterator values (1);
> >
> > sqlite>insert into iterator values (2);
> >
> > sqlite>insert into iterator values (3);
> >
> > sqlite>insert into iterator values (4);
> >
> > sqlite>insert into iterator values (5);
> >
> > sqlite>insert into iterator values (6);
> >
> > sqlite>insert into iterator values (7);
> >
> > sqlite>insert into iterator values (8);
> >
> > sqlite>insert into iterator values (9);
> >
> > sqlite>create index iter on iterator(i);
>
>
>
> Best regards, Alexey.
>



-- 
******************************
Michael Janis
[EMAIL PROTECTED]
******************************
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to