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: Help me with Triggers Please!!

Re: Help me with Triggers Please!!

From: Mike Lewis <mike.lewis_at_lgeenergy.com>
Date: 1997/07/18
Message-ID: <01bc93be$9b3f0880$902077aa@lewism.lgeenergy.com>#1/1

Ricky,

I'm not real sure what you are trying to accomplish with this trigger, but the error you are getting is a result of trying to use the column name in the values portion of the insert statement immediately following the begin statement.

    insert into studentdb values(studentdb.stuid);

This needs to be a valid sql expression or a subquery.

However, once you correct this problem, the trigger will result in an overflow condition as the insert statement within the trigger will initiate a call to the trigger again..and again..and again...

Hope this helps!

Mike Lewis
502-627-3817
Mike.Lewis_at_LGEenergy.com

Ricky <rforde_at_sangacorp.com> wrote in article <33CF7F57.AFB8F22B_at_sangacorp.com>...
> I created this trigger to perform an insert on another table:
> CREATE OR REPLACE trigger ricky
> before insert on studentdb
> DECLARE
> dumstudent char(3);
> begin
> insert into studentdb values(studentdb.stuid);
> SELECT studentdb.stuid
> INTO dumstudent
> FROM studentdb;
> insert into temptable values(dumstudent);
> end;
>
> But this error keeps occurring when I do the insert on studentdb:
> insert into studentdb values('555')
> *
> ERROR at line 1:
> ORA-00984: column not allowed here
> ORA-06512: at line 4
> ORA-04088: error during execution of trigger 'SYSTEM.RICKY'
>
> By the way I'm using Personal Oracle 7.
>
>
Received on Fri Jul 18 1997 - 00:00:00 CDT

Original text of this message

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