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 -> :New record in a trigger

:New record in a trigger

From: <padenj_at_mesaii.trw.com>
Date: Thu, 28 Oct 1999 18:04:24 GMT
Message-ID: <7va376$6v4$1@nnrp1.deja.com>


I am trying to find a way to update another table as a new row is being entered into a table. I have a before insert trigger for an effective dated table and want to fill in a table which tracks just the last action. Here is my question:

I had assumed that the bind variable :new was defined as a %ROWTYPE record, so I created a function which had tablename%ROWTYPE as its variable. Oracle doesn't seem to recognize :new by itself (it understand :new.empid, etc) my function call was defined as

FUNCTION myFunction(newRow IN tablename%ROWTYPE) RETURNS BOOLEAN; and I tried a call as follows in the trigger:

status := myFunction(:new);

And got back the error saying NEW is an undefined bind variable.

What's wrong with this and how do I fix it.

Thanks in advance

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Oct 28 1999 - 13:04:24 CDT

Original text of this message

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