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: Mark C. Stock <mcstockX_at_Xenquery>
Date: Tue, 14 Feb 2006 06:04:46 -0500
Message-ID: <Te-dnZxAYdTSJGzeRVn-qg@comcast.com>

"Oliver Neumann" <tha.beast_at_web.de> wrote in message news:dss6i4$ge2$01$1_at_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
:
: ----- Original Message -----
: From: "Mark C. Stock" <mcstockX_at_Xenquery .com>
: Newsgroups: comp.databases.oracle.server
: Sent: Tuesday, February 14, 2006 3:05 AM
: Subject: Re: Trigger & Sequence
:
:
: > 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
:
:

good.

get in the habit of putting your reply down here -- keeps the locals happy. posting it up at top gets them riled up.

++ ms Received on Tue Feb 14 2006 - 05:04:46 CST

Original text of this message

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