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 -> New to DB Triggers..can U find the error?

New to DB Triggers..can U find the error?

From: Kelly <kgrigg_at_acxiom.com>
Date: 1997/08/20
Message-ID: <5tf4dm$384_002@conway.acxiom.com>#1/1

Hello all,
I am trying to write my first database trigger. Basically, on insert of a table, I want to insert values on each row to 2 other tables. When I run this script in SQL Plus, I get a warning: trigger created with compilation errors.

Here is the code:

create trigger trig_address_load
after insert on address_load
for each row

begin
insert into address
values(seq_address_id.nextval,:new.zip_book,:new.room,NULL,NULL,:new. street_directional,
:new.street_number,:new.street_name,:new.rural_route_address,:new.
 stated_community,
:new.po_box_number,NULL,:new.fire_locator,NULL);

insert into address_associations
values(:new.book_book_number,:new.book_book_pub_date,:new.listing_number,:new. section_number,
:new.page_number,seq_address_id.currval,NULL);

end;

/

I have been following some examples in Oracle: The complete reference, and can't see where the problem is....

Any and ALL suggestions welcomed!!

Kelly
kgrigg_at_acxiom.com

ps. Please CC by mail too, our newsfeed here isn't very reliable

"If you've had half as much fun as me...

    ....Then I've had twice as much fun as you!!"

kgrigg_at_acxiom.com
cayenne_at_cei.net

Visit my Website at: http://www.cei.net/~cayenne/index.html Received on Wed Aug 20 1997 - 00:00:00 CDT

Original text of this message

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