Thanks, But, my problem is that the SQL language specification doesn't specify what exactly a 'trigger-step' is:
"trigger-step ::= update-statement | insert-statement | delete-statement | select-statement" For example: "SELECT RAISE(ABORT, "a is too long") WHERE length(NEW.a) > 3;" is a valid 'select-statement', but only in a trigger, and in the specification isn't explicit how to use the 'raise-function' in a 'select-statement', because is no connection between 'select-statement' and 'raise-function'. So, the specification isn't great help. --- My question is if it's possible to change the value inserted or updated inside a trigger? Something like this: CREATE TABLE foo (a); BEFORE INSERT ON foo BEGIN NEW.a=1; END; I know that by the specification it's not possible to do this, and by my tests isn't possible to, but maybe someone know a valid 'insert-statement' or 'select-statement' that do what I need, or someone else that know sqlite so well that tell me that is not possible. Is it very important to me be sure if it is possible or not, because if isn't possible it will represents a lot of work out side DB. Thanks, for all. -----Original Message----- From: Peter Pistorius [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 25 de Março de 2004 11:45 To: António Vieira (DSI) Cc: [EMAIL PROTECTED] Subject: RE: [sqlite] Change value on a trigger There is an entire section in the SQL language specification dedicated to triggers, if you need further help just come and ask. http://www.sqlite.org/lang.html Regards, PeterP. -----Original Message----- From: António Vieira (DSI) [mailto:[EMAIL PROTECTED] Sent: Thursday, March 25, 2004 11:29 AM To: '[EMAIL PROTECTED]' Subject: [sqlite] Change value on a trigger In sqlite it's possible to change the value inserted or updated inside a trigger? Something like this: CREATE TABLE foo (a); BEFORE INSERT ON foo BEGIN NEW.a=1; END; Thanks. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]