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: use of :new and :old in triggers

Re: use of :new and :old in triggers

From: Tomm Carr <tommcatt_at_geocities.com>
Date: 1997/07/28
Message-ID: <33DD4BF6.1C47@geocities.com>#1/1

Stefan Seeger wrote:
>
> I have a question about using the :new and :old types in a database
> trigger:
> Is there any way to copy the contents of :new or :old in a ROWTYPE variable
> without naming every column?

I remember struggling with this a while ago and finally settled on passing each attribute separately. That doesn't mean it's not possible, it just wasn't important enough to spend much time on. In thinking about it again, I wonder if something like the following would work:

  ....
    newRow table%rowtype;
  begin
    select :new -- or :new.* (???)
    into newRow
    from dual;
    proc( newRow );
  ...

If nothing else, the error msg from trying to compile/run the above may give you a hint for another tact. Let me know what happens.

-- 
Tomm Carr
--
"Can you describe your assailant?"
"No problem, Officer.  That's exactly what I was doing when he hit me!"
Received on Mon Jul 28 1997 - 00:00:00 CDT

Original text of this message

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