Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> New to DB Triggers..can U find the error?
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