I am using sqlite 3.3.5 .

On 3/25/07, Eric Pankoke <[EMAIL PROTECTED]> wrote:

What version of SQLite are you using?  I'm not sure the IF EXISTS option
was present until a certain version of 3.x (though I'm not sure which
version).

Eric Pankoke
Founder
Point Of Light Software
http://www.polsoftware.com/


-----Original Message-----
From: stephan nies [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 25, 2007 1:47 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] CREATE TRIGGER IF NOT EXISTS throws error

Hello,
when i build a test table with:

CREATE TABLE test(a text);

and try to implement a trigger using:

CREATE TRIGGER IF NOT EXISTS trig_name
BEFORE INSERT ON test
FOR EACH ROW BEGIN
SELECT RAISE(ROLLBACK, 'blabla')
WHERE NEW.a = 'pong';
END;

I get this error message:
SQL error: near "NOT": syntax error


if i omit the "IF NOT EXISTS" everything woks fine.
According to the Documentation at
http://www.sqlite.org/lang_createtrigger.html
SQLite should understand this syntax.
So what am i doing wrong here?

Thanks,
Stephan




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]

-----------------------------------------------------------------------------


Reply via email to