INSERT AUTOMATIC
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: INSERT AUTOMATIC

  1. #1
    Join Date
    Jul 2002
    Posts
    228
    HI,
    I've two tables BL, SITE and it has the same column ADDRESS1.
    How Can I see the same value of column ADDRESS1 in both tables when I insert a new record in table SITE??
    I tried this trigger:

    CREATE OR REPLACE TRIGGER insert_address1
    AFTER INSERT
    ON SITE
    REFERENCING OLD AS OLD NEW AS NEW
    FOR EACH ROW
    DECLARE
    Begin
    insert into BL (ADDRESS1) values (:new.ADDRESS1);
    end;

    but when I insert a new record in table SITE I see this error:

    ora-01400:cannot insert null into ("bl"."bl_id")
    ora-06512: at scott.insert_address1
    ora-04088: error during execution of trigger insert_address1

    table BL has many columns NOT NULL.

    How can I write this trrigger???

    and, moreover, if I want modify just the value of ADDRESS1 in table SITE and I want see it in table BL How can I do??

    Thanks

    Raf



  2. #2
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    Please do not post the same question to more than one forum.

    http://www.dbasupport.com/forums/sho...threadid=29051

    Thanks,

    - Chris
    Christopher R. Long
    ChrisRLong@HotMail.Com
    But that's just my opinion. I could be wrong

  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    spamming again?

    geez

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width