On Mon, Aug 25, 2014 at 6:10 AM, Frank Millman <fr...@chagford.com> wrote:

>
> I am trying to do the following -
>
> WITH RECURSIVE temp AS (
>  [initial-select UNION ALL recursive-select]
>  )
> SELECT * FROM temp UNION * FROM temp
>
> I get the error 'no such table: temp'.
>

Hard to test without the exact SQL.  When I tried:

WITH RECURSIVE temp(x) AS (
  SELECT 1 UNION ALL SELECT x+1 FROM temp WHERE x<5
)
SELECT * FROM temp UNION SELECT * FROM temp;

it works fine for me given integers 1 through 5 as the answer.  I
double-checked with:

WITH RECURSIVE temp(x) AS (
  SELECT 1 UNION ALL SELECT x+1 FROM temp WHERE x<5
)
SELECT x FROM temp UNION SELECT x+5 FROM temp;

And did indeed get integers 1 through 10 as an answer.

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

Reply via email to