Sequence then trigger creation problem
453304Sep 29 2005 — edited Sep 30 2005Hi guys,
I'm trying to create a sequence/trigger combination for auto incrementing a table. The trouble is, when I run the script in SQL*Plus Works, it creates the sequence, but ignores the trigger and I can't figure out why.
CREATE SEQUENCE seq_SupportItems START WITH 1 INCREMENT BY 1 NOMAXVALUE;
CREATE TRIGGER trig_SupportItems
BEFORE INSERT ON t_SupportItems
FOR EACH ROW
BEGIN
SELECT seq_SupportItems.nextval INTO :new.si_ID FROM DUAL;
END;
.
If I run them separately, everything works fine.
We had the problem with multiple trigger inserts and therefore added the '.' at the end, but that hasn't solved the sequence problem.
Any help is very much appreciated!
Steve