Vitaly Veksler wrote:

I have created a trigger to do something with the previous value of a particular 
record. My trigger def looks like this:

CREATE TRIGGER ANNOUNCEMENT_UPDATE FOR ANNOUNCEMENT AFTER UPDATE EXECUTE (
TRY
INSERT INTO ANNOUNCEMENT_HISTORY VALUES (
:OLD.ANNOUNCEMENT_GID,
:OLD.BODY
)
CATCH
IF $rc <> 100
THEN STOP ($rc, 'unexpected error');
)


Field BODY is of type LONG. I get this error message when I try to create this trigger:

General error;-9000 POS(116) System error: Not yet implemented:OLD of datatype LONG.

Has anyone figured out a way to work around this limitation?

Do an
INSERT INTO ANNOUNCEMENT_HISTORY SELECT ANNOUNCEMENT_GID, BODY FROM ANNOUNCEMENT WHERE ANNOUNCEMENT = :OLD.ANNOUNCEMENT_GID
inside the trigger. That way, the trigger never sees a LONG value.


Daniel Dittmar

--
Daniel Dittmar
SAP Labs Berlin
[EMAIL PROTECTED]


-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to