SQLite Forum

Timeline
Login

1 forum post by user sio2sio2

2021-08-30
18:00 Post: View with CTE no longer works (artifact: 6a2127b522 user: sio2sio2)

I have recently upgraded my Debian and sqlite3 was automatically upgraded to version 3.36.0. In previous versions this example works:

CREATE TABLE Foobar ( id INTEGER PRIMARY KEY );
INSERT INTO Foobar VALUES (1);

-- "Factor" is not yet defined
CREATE VIEW FoobarV AS
   SELECT id*(SELECT * FROM Factor)
   FROM Foobar;

-- But now I define it
WITH Factor AS (SELECT 8)
   SELECT * FROM FoobarV;

But now it doesn't:

Error: near line 9: no such table: main.Factor

Is it a bug?