Re: GENERATE_SERIES is not available in the command-line shell
Richard Hipp <[email protected]>
| Newsgroups | gmane.comp.db.sqlite.general |
|---|---|
| Message-ID | <CALwJ=MxoRSpzk-G6zak1hZm9fi3+TyDp6WXTvbhbQAPmRAjC=A@mail.gmail.com> |
On 1/21/20, Digital Dog <[email protected]> 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 [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users