[suse-oracle] SQL-SCript for creating a TRIGGER

From: Hartmut Berghoff (h.berghoff@gmx.de)
Date: Mon Oct 07 2002 - 15:00:01 CEST

  • Next message: Hanne Hagedorn: "AW: [suse-oracle] SQL-SCript for creating a TRIGGER"
    Message-ID: <3DA18551.4040104@gmx.de>
    Date: Mon, 07 Oct 2002 15:00:01 +0200
    From: Hartmut Berghoff <h.berghoff@gmx.de>
    Subject: [suse-oracle] SQL-SCript for creating a TRIGGER 
    

    Hello all,

    My oracle 8i is up and running. Now I started to create my structure. THere
    is no problem with the DBA (run from a windows ORacle-Client). For a first
    step this is ok but on the long run administration thiese things I prefere
    to be based on scripts.

    For all my tables, index, checks, constraints, sequnece etc it is ok, but
    when i try with a trigger the script hangs.

    A test in interactive SQLPLUS showed up the problem.

    SQLPLUS> CREATE TRIGGER "DB-OWNER"."TR_TRIGGER"
    2> AFTER INSERT ON "DB-OWNER"."TABLE"
    3> BEGIN
    4> UPDATE table SET Field = Squence.nextvalue where field = -1;
    5> END;
    6>

    This never ends. No ";" or a lot of other characters I tried will terminate
    the command and return to the sqlplus-prompt.

    General Code I took from a Dump taken after generating a trigger with DBA
    (see above). This dba displays the SQL-statemant before you klick ok to
    really create and it looks like mine.

    Of course I studied the SQLPLUS-Docu, but I have some difficulty to
    interprete that.

    Any help out there?
    While awaiting your answers I'll try with parenthesis arroung the statements
    and others possibilities currently I don't think of.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: suse-oracle-unsubscribe@suse.com
    For additional commands, e-mail: suse-oracle-help@suse.com
    Please see http://www.suse.com/oracle/ before posting



    This archive was generated by hypermail 2.1.4 : Mon Oct 07 2002 - 15:00:34 CEST