Re: [sqlite] Trigger commands don't update "new" record?

2008-11-17 Thread Chris Eich
[Apparently I don't get my own postings to this list?] Anyway, I have an improvement to my trigger that eliminates the SELECT's for event_id: two triggers! Comments welcome. -- First set the SET's correlation id when a CLR is inserted CREATE TRIGGER set_event_correlation_id_on_insert AFTER IN

Re: [sqlite] Trigger commands don't update "new" record?

2008-11-17 Thread Chris Eich
[Sorry if you see this twice; I sent it yesterday and see it in the archives, but never got it in my inbox. --Chris] On Sun, Nov 16, 2008 at 12:59 PM, Chris Eich <[EMAIL PROTECTED]> wrote: > I have an events table where SET events for a given device_id and > event_code are followed by CLR events.

[sqlite] Trigger commands don't update "new" record?

2008-11-16 Thread Chris Eich
I have an events table where SET events for a given device_id and event_code are followed by CLR events. CREATE TABLE device_event ( event_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, device_id INTEGER NOT NULL REFERENCES device, event_date INTEGER NOT NULL, event_code INTEGER NO