What if you do a BEFORE INSERT and stick the values in a temporary table (use a matching rowid).
Then you can just retrieve in in your AFTER trigger. Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems ________________________________ From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Tony Caras [tca...@yahoo.com] Sent: Thursday, January 12, 2012 6:48 PM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] UPSERT again There aren't any true updates, all updates are done using the INSERT OR REPLACE. ________________________________ From: jr <creature.eter...@gmail.com> To: sqlite-users@sqlite.org Sent: Thursday, January 12, 2012 5:47 PM Subject: Re: [sqlite] UPSERT again On 13/01/12 00:17, Tony Caras wrote: > UPSERT (really means update the record if it exists otherwise insert the > record) > > > AFTER INSERT (I meant a trigger after an insert. In this case I have access > to the new value but not the "old" values in the record.) > > If UPDATE would insert the record if it didn't exist then I could use the > trigger you have suggested. > > two triggers? one AFTER INSERT, one AFTER UPDATE. jr. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users