[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] Syntax error on CREATE TRIGGER IF NOT EXISTS
From:       Jim Terman <jterman () tivo ! com>
Date:       2010-05-28 19:27:04
Message-ID: 4C001908.50608 () tivo ! com
[Download RAW message or body]

sqlite 3.3.6. I didn't realize it was so old. Thanks.

Igor Tandetnik wrote:
> Jim Terman <jterman@tivo.com> wrote:
> 
> > It looks like to me that CREATE TRIGGER IF NOT EXISTS is recognized by
> > sqlite, but I get the following from the command line:
> > 
> > sqlite> CREATE TABLE foo (id INTEGER PRIMARY KEY, value TEXT,
> > timestamp DATE);sqlite> CREATE TRIGGER IF NOT EXISTS foo_log AFTER
> > INSERT ON foo BEGIN INSERT INTO foo (timestamp) VALUES
> > (DATETIME('NOW')); END; 
> > SQL error: near "NOT": syntax error
> > sqlite> CREATE TRIGGER foo_log AFTER INSERT ON foo BEGIN INSERT INTO
> > foo (timestamp) VALUES (DATETIME('NOW')); END;
> > sqlite>
> > 
> 
> My guess is, you are running an older version of SQLite that doesn't yet support \
> this syntax. What does this statement report: 
> select sqlite_version();
> 
> 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic