I have a
SQLite table with these fields among others
Fld_QuoteNumberRoot string Fld_Revision integer Fld_QuoteNumber string
I need to fill
Fld_QuoteNumber on every UPDATE and on every INSERT like this:
'Q00897' + 4 => 'Q00897/4'
Using this trigger
CREATE TRIGGER trigger_quote_number AFTER UPDATE on Quote_Base BEGIN UPDATE Quote_Base SET Fld_QuoteNumber = printf('%s/%d', Fld_QuoteNumberRoot, Fld_Revision) END;
I always the error:
near "END": syntax error
What is wrong with my syntax?
Can I create a trigger which fires on
UPDATE and on
INSERT or do I need to define two triggers?