I know John, obviously "sql" should be replaced with a way to get the
original sql statement that created that row.
My question was is there is some smart way to retrieve it...
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/
On Oct 4, 2007, at 3:09 PM, John Stanton wrote:
Try using the correct delimiter for SQL literals, ', not ".
Marco Bambini wrote:
I need to create a trigger that BEFORE a row is deleted from a
table, the sql used to create that row (or a way to recreate it)
should be saved to another backup table.
For example:
CREATE TRIGGER trigger_delete Before DELETE ON table1
BEGIN
INSERT INTO backup_table(oldid, sql, tablename, operation)
VALUES (old.rowid, "sql", "table1", 1);
END
The missing field is "sql" ... do you have a smart idea to solve
my problem?
Thanks.
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/
---------------------------------------------------------------------
-------- To unsubscribe, send email to sqlite-users-
[EMAIL PROTECTED]
---------------------------------------------------------------------
--------
----------------------------------------------------------------------
-------
To unsubscribe, send email to [EMAIL PROTECTED]
----------------------------------------------------------------------
-------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------