Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Posts
    1

    Unanswered: Create Trigger Dies

    Using SQL*Plus to try and create a trigger on an Oracle 8 Database for a college project. When I input the trigger I do not get an error, I do not get a message that tells me it has succeeded, what I do get is another line prompt like I forgot to put a semicolon... thing is, semicolon is there. I'm using the trigger from the Oracle Documentation at the bottom of this page:

    http://download-west.oracle.com/docs...6d.htm#2064079

    Here is a sample session, you can see where I tried entering some more semicolons to no avail:

    SQL> CREATE TRIGGER instrig INSTEAD OF INSERT ON all_customers
    2 FOR EACH ROW
    3 BEGIN
    4 IF (:new.cust.location = 'SAN_JOSE') THEN
    5 INSERT INTO customers_sj
    6 VALUES (:new.cust.cust, :new.cust.address,:new.cust.credit);
    7 ELSE
    8 INSERT INTO customers_pa
    9 VALUES (:new.cust.cust, :new.cust.address, :new.cust.credit);
    10 END IF;
    11 END;
    12 ;
    13 ;
    14 ;
    15 ;
    16 ;
    17 ;
    18

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Create Trigger Dies

    You need to enter a slash "/" on its own to end the input:

    11 END;
    12 /

    SQL>

Posting Permissions

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