Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> 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.stree
t_directional,
:new.street_number,:new.street_name,:new.rural_route_address,:new.stated_c
ommunity,
: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
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Wed Aug 20 1997 - 00:00:00 CDT
![]() |
![]() |