I am using Sybase ASE 15.0.3 and DBArtisan 8.5.3.
I am trying to create a trigger that puts data into audit tables when a table gets updated.
My code is something like
CREATE TRIGGER AUDIT_TRG ON TABLE A
FOR INSERT,UPDATE
REFERENCING OLD AS OLD NEW AS NEW
I am getting a syntax error stating incorrect syntax near referencing. If I specify only old or new i get a different error as OLD or NEW is not valid identifier or something like that (I am unable to remember the exact error)
I even tried using :old and :new but they dont seem to be working.
Please let me know how can i access the old and new record values of the table being updated.