This triggers does not work, what am I doing wrong?
CREATE TRIGGER ARB_TRIGG_05 UPDATE OF FK_KOST ON ARB FOR EACH ROW BEGIN UPDATE VOR SET FK_KOSTN_ARB_SUM = FK_KOSTN_ARB_SUM - OLD.FK_KOSTN + NEW.FK_KOSTN WHERE ORDERNR = NEW.ORDERNR; END
I am making a change of FK_KOST in ARB and want change to update an overruled table VOR.
But FK_KOSTN_ARB_SUM in VOR does not update.
CREATE TRIGGER ARB_TRIGG_05 AFTER UPDATE ...
I feel a bit stupid as not myself, did not understand it.
Do you have any of the SQLite books?
The SQL Guide to SQLite by Rick F. van der Lans 978-0-557-07676-5
The Definitive Guild to SQLite by Michael Owns 978-1-59059-673-9
I have The Definitive Guild to SQLite by Michael Owns and
Using SQLite by Jay A. Kreibich.
Thanks for the tip.
No worries Fim, took quite a bit of trial and error before I got it too. SQLites generally doesn't give very helpful feedback (error handling) when you have malformed SQL statements, so it is a bit tricky sometimes to troubleshoot SQL (statement) code.
Thank you for the comforting words.