Re: [sqlite] UPDATE question

2011-10-18 Thread Marshall Cline
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 *

Re: [sqlite] Changing the data type of an existing table

2011-10-18 Thread Marshall Cline
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

[sqlite] pragma PAGE_COUNT != pragma page_count

2011-10-13 Thread Marshall Cline
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