Re: Trigger & Sequence ++ show errors for triggers



Mark C. Stock wrote:
"DA Morgan" <damorgan@xxxxxxxxx> wrote in message news:1139942523.850946@xxxxxxxxxxxxxxxxxxxxxx
: Mark C. Stock wrote:
:
: > 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
:
: Excuse me ...
:
: SQL> CREATE TABLE orders (
: 2 somecolumn VARCHAR2(20),
: 3 numbercol NUMBER(10),
: 4 datecol DATE);
:
: Table created.
:
: SQL> CREATE OR REPLACE TRIGGER statement_level
: 2 BEFORE UPDATE
: 3 ON orders
: 4
: 5 DECLARE
: 6 vMsg VARCHAR2(30) := 'Statement Level Trigger Fired';
: 7 BEGIN
: 8 dbms_output.put_linZe(vMsg);
: 9 END statement_level;
: 10 /
:
: Warning: Trigger created with compilation errors.
:
: SQL> sho err
: Errors for TRIGGER STATEMENT_LEVEL:
:
: LINE/COL ERROR
: -------- ---------------------------------------------------
: 4/3 PL/SQL: Statement ignored
: 4/15 PLS-00302: component 'PUT_LINZE' must be declared
: SQL>
:
: It doesn't? Now you tell me. ;-)
: -- : Daniel A. Morgan
: http://www.psoug.org
: damorgan@xxxxxxxxxxxxxxxx
: (replace x with u to respond)

Not without a database version and OS!




ok, i've had problems with this in the past, and tested it on 10.1.0.2.0 before i posted, and it appeared not to work

tried your example, and it worked

didn't save my test

so, we know it works in 10.1.0.2.0 and whatever version you're running but refused to disclose ;-)

i do recall having issues with this in the past, though. anyone else remember any problems with this?

++ mcs

I ran it on the only version I had handy: 10.2.0.1 but I've seen this
behaviour on earlier versions too.
--
Daniel A. Morgan
http://www.psoug.org
damorgan@xxxxxxxxxxxxxxxx
(replace x with u to respond)
.



Relevant Pages

  • Re: Case when with 2 conditions
    ... Mark C. Stock wrote: ... not sure exactly what your suggesting to note, but there is no '==' in PL/SQL or SQL ... in the SQL UPDATE command SET clause, '=' doubles the assignment operator ...
    (comp.databases.oracle.server)
  • Re: Stock for a 1909 Argentine Mauser
    ... # and I'm wondering if a Mark X stock will fit. ... # My reasoning is since the Mark X already had a somewhat modern trigger ...
    (rec.guns)
  • Trgieer problem (losing my mind)
    ... I have something interesting going on with my trigger on ... Code that works in SQL QA: ... INSERT OPENQUERY(DBODBC, 'SELECT * FROM STOCK') values ('StockCode', ... Code that FAILS in SQL trigger ...
    (microsoft.public.sqlserver.programming)
  • Trigger problem (losing my mind!)
    ... I have something interesting going on with my trigger on ... Code that works in SQL QA: ... INSERT OPENQUERY(DBODBC, 'SELECT * FROM STOCK') values ('StockCode', ... Code that FAILS in SQL trigger ...
    (microsoft.public.sqlserver.programming)
  • Re: Trigger not updating in all conditions
    ... INSERT INTO MATERIALS ... TRIGGER FOR INSERT,UPDATE,DELETE IN MATERIALS TABLE ... row in Stock, there can only be one row in INSERTED with the ... Links for SQL Server Books Online: ...
    (microsoft.public.sqlserver.programming)