Trigger Oracle - Übergabe Werte
Hallo,
ich dabei meinen ersten Trigger zu schreiben.
create or replace TRIGGER PNUMMER_VERGEBEN
AFTER UPDATE OF FREIGABE_KZ ON ADI_FKOP
FOR EACH ROW
BEGIN
INSERT INTO ADI_PDNR (BAU_NR,
KD_VORGANGS_NR,
RUECKMELDE_NR,
BNR_STATUS)
VALUES ('0099999999',
9999999,
9999999,
0);
END;
Das funktioniert so weit. Jetzt möchte ich aber, dass die Werte für KD_VORGAGNS_NR und RUECKMELDE_NR aus der Tabelle ADI_FKOP eingefügt werden.
Die Werte für die Felder BAU_NR und BNR_STATUS bleiben fest (0099999999 und 0)
Wie muss die Syntax lauten?
ich dabei meinen ersten Trigger zu schreiben.
create or replace TRIGGER PNUMMER_VERGEBEN
AFTER UPDATE OF FREIGABE_KZ ON ADI_FKOP
FOR EACH ROW
BEGIN
INSERT INTO ADI_PDNR (BAU_NR,
KD_VORGANGS_NR,
RUECKMELDE_NR,
BNR_STATUS)
VALUES ('0099999999',
9999999,
9999999,
0);
END;
Das funktioniert so weit. Jetzt möchte ich aber, dass die Werte für KD_VORGAGNS_NR und RUECKMELDE_NR aus der Tabelle ADI_FKOP eingefügt werden.
Die Werte für die Felder BAU_NR und BNR_STATUS bleiben fest (0099999999 und 0)
Wie muss die Syntax lauten?
Please also mark the comments that contributed to the solution of the article
Content-Key: 465715
Url: https://administrator.de/contentid/465715
Printed on: April 25, 2024 at 21:04 o'clock
2 Comments
Latest comment