Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: The pseudo-records :NEW.
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
![]() |
![]() |