Subject Trying to save the current record before updating...
Author fabianchocron
Hi all,

I would like to save the current record before updating on a table,
so I have a Trigger on Update, Before Update:

AS
BEGIN
INSERT INTO INVOICE_LOG
SELECT OLD.* , CURRENT_DATE , CURRENT_TIME
FROM INVOICE INV
WHERE INV.ID = OLD.ID ;
END

This works OK, however shouldn't it be:


AS
BEGIN
INSERT INTO INVOICE_LOG
VALUES OLD.* , CURRENT_DATE , CURRENT_TIME ;
END

Of course this one does not work, So I am trying to understand why?

ISC ERROR CODE:335544569
ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 5, char 11
OLD

Thanks in advance!
Fabian