Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger & Sequence

Re: Trigger & Sequence

From: Oliver Neumann <tha.beast_at_web.de>
Date: Tue, 14 Feb 2006 10:10:53 +0100
Message-ID: <dss6i4$ge2$01$1@news.t-online.com>


Hey,

its working now. Seems it really had something todo with my slash position. I still get the error of "missing in- or out-parameter at index:1" in my java-PreparedStatement Execution but its another thing.

thanks guys,
oliver

> your complete command in SQL*Plus probably looked something like this:
>
> SQL> create trigger "AUTOINC_OBJECT_TEAMS_CLIENT" before insert on
> 2 OBJECT_TEAMS_CLIENT
> 3 for each row begin
> 4 select AUTOINCRSEQ.nextval into :new.CLIENT_ID from dual;
> 5 end;/
> 6 GO
> 7 /
>
> or perhaps you didn't type a slash on line 7, but typed RUN at the 'SQL>'
> prompt
>
> here's a type and an syntax error that are likely contributing:
>
> line 5: the '/' is incorrect -- in SQL*Plus, this must come as the first
> character of a line, not in any other position
>
> line 6: the GO is not SQL*Plus or Oracle -- it's from that other tool. but
> since your '/' on 5 was misplaced, line 6 got included in the trigger
source
>
> daniel's suggestion is good, except SQL*Plus has it's own little quirk in
> that SHOW ERRORS does not work on trigger compilation errors
> to follow his advice and see the errors, you'll need to do a SELECT from
the
> USER_ERRORS data dictionary view
>
> and a bit of a formatting suggestion: BEGIN is the common way of starting
a
> PL/SQL block, in triggers and otherwise. FOR EACH ROW is specific to
trigger
> specifications. so, better to put the BEGIN on a line all by itself where
it
> logically belongs, and where you'll see it in other PL/SQL code
Received on Tue Feb 14 2006 - 03:10:53 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US