Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: What's wrong with this SQL statement?

Re: What's wrong with this SQL statement?

From: Alexander I. Doroshko <aid_at_grant.kharkov.ua>
Date: 19 Jun 1998 17:27:33 GMT
Message-ID: <01bd9ba6$f10d50a0$190114c1@sister.grant.UUCP>

  1. You have no semicolon after update statement.
  2. You may not qualify column names with table names here.
  3. Use instead of update (which wouldn't work even after compilation, giving "table mutating" error while runtime)

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US