Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> What's wrong with this SQL statement?
I would like to have oracle update the item_id field (kind of like the
counter field in ms-access) whenever a new record is created. But when
I try to create my trigger to do this, I receive the following error:
"ora6552: compilation unit analysis terminated"
"ora6553: pls:320: the declaration of the type of this expression"
I have created a sequence called: inv_field_items_sequence
CREATE OR REPLACE TRIGGER "DCI".INV_FIELD_ITEMS_TRIGGER AFTER INSERT ON
"DCI"."INV_FIELD_ITEMS" for each row
begin
update dci.inv_field_items
set dci.inv_field_items.item_id=dci.inv_field_items_sequence.nextval
where dci.inv_field_items.item_id = :NEW.item_id
end;
Any idea on what I am do missing or doing wrong?
Troy Perchotte Received on Thu Jun 18 1998 - 19:33:40 CDT