On 2014/07/12 20:37, Staffan Tylen wrote:
Ryan
"After your final Select statement, the constructed "WITH" table no longer exists, it's scope is only visible to the select
following the declaration, so anything after a UNION is a new select and as such cannot refer to anything inside the previous
select's constructs or clauses."
This is exactly what I've looked for in the documentation, but I've been unable to find any mentioning of this limitation. The
closest I found was this:
*
The WITH clause must appear at the beginning of a top-level SELECT
<http://www.sqlite.org/lang_select.html> statement or at
the beginning of a subquery. The WITH clause cannot be prepended to the
second or subsequent SELECT statement of a compound
select <http://www.sqlite.org/lang_select.html#compound>.
There is no mention here that the WITH clause in not visible to subsequent SELECT statements. Knowing this I'll use your "last
option" as that seems to do what I'm looking for.
Thanks.
Agreed, this might also have changed since 3.8.3 or may still change - A
clarification in the documentation is probably a good idea.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users