Because your query was fairly complex, to help everyone debug it, I
simplified it using simple names (tables are a, b, c; fields are m, n, x, y,
z) and much simpler use of whitespace / indentation:
UPDATE a
SET x = CASE
WHEN EXISTS
(
SELECT *
I think you've already found a good solution to your problem by directly
modifying the master table, so this is mostly an academic curiosity, but would
it be a viable alternative to use a VIEW? In other words, rather than messing
with the TABLE that holds the data, could you simply create a
Symptoms: "pragma page_count" returns the correct number of pages, but
"pragma PAGE_COUNT" always returns 1073741823:
% sqlite3 sample.db
SQLite version 3.7.8 2011-09-19 14:49:19
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> pragma page_count;
3
3 matches
Mail list logo