On 16 Sep 2015, at 7:27pm, Nicolas J?ger <jagernicolas at legtux.org> wrote:
> CASE ( SElECT BOOL FROM _TAG_EXISTS_RESULT_ ) WHEN 0 CASE takes a value. You can't put a SQLite command in there. More generally, you come from a programming background and are expecting SQL to work like a programming language. It doesn't. Constructions like this > INSERT INTO _TAG_EXISTS_RESULT_ ( NAME, BOOL ) > SELECT 'evil little sister' should be rewritten so that you are not trying to do a SELECT in the middle of your INSERT. This is why we quoted the form INSERT OR IGNORE ...; UPDATE ...; earlier. Two separate commands, not one command trying to run another. Simon.