On 1/21/20, Digital Dog <digitald...@gmail.com> wrote:
> Hi!
>
> In the docs here
> https://www.sqlite.org/series.html
> there's this statement "The generate_series(START,END,STEP) table-valued
> function is a loadable extension included in the SQLite source tree, **and
> compiled into the command-line shell.**" Unfortunately in version 3.30.1 on
> Windows downloaded from SQLite.org it's not available by default.
> Is it going to be fixed in 3.31?

I'll fix the documentation, so that it doesn't say that any more, if
that is what you mean by "fixed".  :-)

You can use a recursive common table expression in place of
generated_series().  Like this:

WITH generate_series(value) AS (
  VALUES($START)
  UNION ALL
  SELECT value + $STEP FROM generate_series
    WHERE value $ STEP <= $STOP
)
SELECT value FROM generate_series;

This is more typing, I know.  But it is the official SQL standard way
of getting an ascending list of integers.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to