Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> :New record in a trigger
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