2.8.15
I just tested it on 3.0.8 and - you are right - it works.
Is there any reason to use 2.8 instead of 3.0? I use SQLite via python (pysqlite).


Best regards,
Witold

----- Original Message ----- From: "D. Richard Hipp" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Friday, February 11, 2005 12:16 AM
Subject: Re: [sqlite] TYPEOF in triggers



On Thu, 2005-02-10 at 23:59 +0100, Witold Czarnecki wrote:
sqlite> CREATE TABLE test(a NUMERIC);
sqlite> CREATE TRIGGER test1 BEFORE INSERT ON test FOR EACH ROW BEGIN
...> SELECT CASE WHEN (TYPEOF(NEW.a) != 'numeric') THEN RAISE(ABORT, 'Error!') END;
...> END;
sqlite> INSERT INTO test VALUES('aaa');
sqlite> SELECT TYPEOF(a) FROM test;
numeric
sqlite>


Why this trigger doesn't fire?


I tired the above (using copy/paste) and the trigger did fire. What version of SQLite are you running? -- D. Richard Hipp <[EMAIL PROTECTED]>





Reply via email to