Jens Stier wrote : >i have the following two tables:
>CREATE TABLE "TBLARTIKEL" >( > "ID" Integer, > "BEZEICHNUNG" Varchar (50), > "BILD" Long BYTE >) >CREATE TABLE "TBLARTIKEL2" >( > "BEZEICHNUNG" Varchar (50), > "BILD" Long BYTE >) >now i want to create a trigger that inserts a new row to tblartikel2 each >time tblartikel is updated: >CREATE TRIGGER artikelupdate FOR TBLARTIKEL AFTER UPDATE EXECUTE >( >INSERT INTO "DBA".ARTIKEL2(BEZEICHNUNG,BILD) >VALUES(:NEW.BEZEICHNUNG,:NEW.BILD); >) >if i don't save anything to the field "BILD" everything works fine. but if >anything is written to "BILD" I get the error message: >GENERAL ERROR;-3102 >Is there any problem with long byte fields in triggers? how can i do this >then?? Long columns in triggers are not yet supported, this will come with version 7.5. Assuming column "ID" is the key of table "TBLARTIKEL" you can use the following workaround : CREATE TRIGGER artikelupdate FOR TBLARTIKEL AFTER UPDATE EXECUTE ( INSERT INTO "DBA".ARTIKEL2(BEZEICHNUNG,BILD) SELECT "BEZEICHNUNG", "BILD" FROM "DBA"."TBLARTIKEL" WHERE "ID" = :ID; ) Regards, Thomas -- Thomas Anhaus SAP DB, SAP Labs Berlin [EMAIL PROTECTED] http://www.sapdb.org/ _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
