"INSERT INTO table AS alias" is invalid inside triggers

[email protected]
Newsgroups gmane.comp.db.sqlite.general
Message-ID <[email protected]>
I suspect I have found a parsing error in SQLite 3.30.1. Given the
following:

    CREATE TABLE t1(a INTEGER PRIMARY KEY);

The following statement is accepted by the parser:

    INSERT INTO t1 AS original (a) VALUES(1)
      ON CONFLICT DO NOTHING;

However if I wrap it inside a trigger:

    CREATE TABLE t2(b INTEGER);

    CREATE TRIGGER t2_ai
    AFTER INSERT ON t2
    FOR EACH ROW BEGIN

        INSERT INTO t1 AS original (a) VALUES(NEW.b)
          ON CONFLICT DO NOTHING;

    END;

Then SQLite fails to prepare: near "AS": syntax error [for Statement
"CREATE TRIGGER...."]

-- 
Mark Lawrence
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.