Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What's wrong with this SQL statement?
select inv_field_items_sequence.nextval into :new.item_id;
4. Make your trigger BEFORE INSERT to avoid effects of old item_id,
which has incorrect value.
---
Alexander I.Doroshko, aid_at_grant.kharkov.ua
Troy Perchotte <max_at_headroom.com> wrote in article
<3589B1E4.B95806E5_at_headroom.com>...
> I receive the following error:
>
> "ora6552: compilation unit analysis terminated"
> "ora6553: pls:320: the declaration of the type of this expression"
> 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 Fri Jun 19 1998 - 12:27:33 CDT