Oh, Art hat eine andere Quelle....
SQL:
CREATE OR REPLACE TRIGGER DEMO.CHARGE_MHD
BEFORE INSERT
ON DEMO.Artikel_Charge
FOR each ROW
DECLARE
artikel_art Artikel.Art%type;
BEGIN
SELECT art INTO artikel_art
FROM Artikel
WHERE Artikel.ArtikelID = :new.ArtikelID;
CASE artikel_art
CASE '1' THEN :NEW.MHD := :NEW.datherst +700;
CASE '2' THEN :NEW.MHD := :NEW.datherst +1065;
CASE '3' THEN :NEW.MHD := :NEW.datherst +1430;
CASE '4' THEN :NEW.MHD := :NEW.datherst +1796;
CASE '5' THEN :NEW.MHD := :NEW.datherst +1796;
CASE '6' THEN :NEW.MHD := :NEW.datherst +1796;
CASE '7' THEN :NEW.MHD := :NEW.datherst +1796;
CASE '8' THEN :NEW.MHD := :NEW.datherst +1065;
CASE '9' THEN :NEW.MHD := :NEW.datherst +700;
CASE 'A' THEN :NEW.MHD := :NEW.herstelldatum +1430;
END CASE;
END;