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: The pseudo-records :NEW.

Re: The pseudo-records :NEW.

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Wed, 15 Sep 1999 19:07:20 +0200
Message-ID: <937415304.29669.0.pluto.d4ee154e@news.demon.nl>


Hmmm, I wish I could write Spanish.
You mean this trigger (which only assigns to local variables) makes an insert on the table inserciones fail?
That is quite unlikely, especially as the code is correct (OK, the local variables will disappear after the trigger has run) What are you trying to accomplish? Are you trying to insert a record in a different table whenever you have an insertion on the 'master' table. Or are we already looking at the logging table? In that case: the trigger should be created on the master table. Can you verify you have sufficient privilege on the table you try to insert to.
(You can check this by select * from all_tab_privs where table_name = '<table_name>')
Can you post the exact error message including the ora-xxx error number. Can you issue a select * from user_errors to see whether you have any compilation problems with that trigger.

Hth,

--
Sybrand Bakker, Oracle DBA
Oscar Martinez <oscarm_at_sicon.net> wrote in message news:7rnj16$s9v$1_at_talia.mad.ttd.net...

> Sorry, for the wrong question. I'm working in a Oracle Database v8.0 and
> WinNt WorkStation ver 4.0.
>
>
> I use the pseudo-record in this way:
>
> * :new.column_name.
>
> In this trigger, I only make this:
>
> CREATE OR REPLACE TRIGGER GENERAR_FACTURAS
> AFTER INSERT ON INSERCION
> FOR EACH ROW
>
> DECLARE
>
> ID_ORDE VARCHAR2(10);
> ID_INSER VARCHAR2(10);
> ID_CLI VARCHAR2(10);
> FL_FACT CHAR(1);
> C_ESPECIAL VARCHAR2(10);
>
>
> BEGIN
> ID_CLI:=:NEW.ID_CLIENTE;
> ID_ORDE:=:NEW.ID_ORDEN;
> ID_INSER:=:NEW.ID_INSERCION;
> C_ESPECIAL:=:NEW.ID_COND_ESPE;
> FL_FACT:=:NEW.FLAG_FACT;
> END;
>
> Only make this, happend the error describe in the original message:
>
> ORACLE error: unable to INSERT record.
>
> Thanks for your help, Sybrand.
>
>
>
Received on Wed Sep 15 1999 - 12:07:20 CDT

Original text of this message

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