Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What's wrong with this SQL statement?
A copy of this was sent to Troy Perchotte <max_at_headroom.com>
(if that email address didn't require changing)
On Mon, 22 Jun 1998 11:08:10 -0700, you wrote:
>I have changed the statement a few additional times, still with my error.
>Here is what I have now:
>
>CREATE OR REPLACE TRIGGER "DCI".INV_FIELD_ITEMS_TRIGGER BEFORE INSERT ON
>"DCI"."INV_FIELD_ITEMS" for each row
>declare dummy number;
>begin
> select inv_field_items_sequence.nextval into dummy from dual;
> :new.item_id := dummy;
>end;
>
Not able to reproduce myself on 8.0.3 however, it might have something to do with the fact that the single column in the DUAL table is called DUMMY....
Try changing DUMMY in the above block to something else, or.... just code:
select inv_field_items.sequence.nextval into :NEW.item_id from dual;
and skip the un-necessary assigment...
>I still receive the following error messages:
>
>ora-6552 pl/sql: Compilation unit analysis terminated.
>ora-6553 pls-320: the declaration of the type of this expression is
>incomplete or malformed.
>
>Please help.
>
>Troy Perchotte
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Jun 22 1998 - 15:30:52 CDT
![]() |
![]() |