You need two UPDATEs to change rows in two tables. BEGIN; UPDATE TabAgeFattProdutt SET Stato ='I' WHERE NumFattAG = -- the INNER JOIN evaluates to a aingle value -- (SELECT NumFatt FROM TabTestaFattAG WHERE NumFatt = '23/12' -- ) ;
UPDATE TabTestaFattAG SET StatoFatt = 'Chiusa' WHERE NumFatt = '23/12' ; COMMIT; -----Ursprüngliche Nachricht----- Von: Leonardodavinci [mailto:alessan...@system-ini.it] Gesendet: Donnerstag, 27. Dezember 2012 16:57 An: sqlite-users@sqlite.org Betreff: Re: [sqlite] Update with two tables hi i.m new user with sqlite and now i have this problem with update function: with mysql run this script: UPDATE TabAgeFattProdutt INNER JOIN TabTestaFattAG ON TabAgeFattProdutt.NumFattAG = TabTestaFattAG.NumFatt SET TabAgeFattProdutt.Stato ='I', TabTestaFattAG.StatoFatt = 'Chiusa' WHERE TabTestaFattAG.NumFatt = '23/12' but under sqlite not work!!! i think about the problem is the syntax but where??? thanks Alex -- View this message in context: http://sqlite.1065341.n5.nabble.com/Update-with-two-tables-tp9506p66287.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -------------------------------------------------------------------------- Gunter Hick Software Engineer Scientific Games International GmbH Klitschgasse 2 – 4, A - 1130 Vienna, Austria FN 157284 a, HG Wien Tel: +43 1 80100 0 E-Mail: h...@scigames.at This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice as to its status and accordingly please notify us immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any person as to do so could be a breach of confidence. Thank you for your cooperation. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users