Greetings! Imagine these rows in a table named LSOpenJobs:
id, PID,subject, bdate, edate, lang,job 1, 232,2008-01-01,2008-01-10,es,trans 2, 232,2008-01-01,2008-01-10,fr,trans 3, 232,2008-01-01,2008-01-10,it,trans 4, 232,2008-01-01,2008-01-10,es,val 5, 232,2008-01-01,2008-01-10,fr,val 6, 232,2008-01-01,2008-01-10,it,val What I would like to do is to create a trigger to update the bdate for the 'val' job of the same lang and same PID, with the edate of the 'trans' job of same lang and same PID. For example, in this case above, let's take id 1; the bdate for the 'val' job with the 'es' lang with the same PID, id 4, should be updated with the edate of id 1. So, the trigger should UPDATE the table to this, id, PID,subject, bdate, edate, lang,job 1, 232,2008-01-01,2008-01-10,es,trans 2, 232,2008-01-01,2008-01-10,fr,trans 3, 232,2008-01-01,2008-01-10,it,trans 4, 232,2008-01-10,2008-01-10,es,val 5, 232,2008-01-10,2008-01-10,fr,val 6, 232,2008-01-10,2008-01-10,it,val The trigger example in the site expects to change the same row. This UDPATE is based on other rows of the same table and same PID. Any help is greatly appreciated. thanks, josé _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users