Triggers - :new - pseudorecord

From: Jeremy <jeremy0505_at_gmail.com>
Date: Mon, 16 Sep 2013 17:35:41 +0100
Message-ID: <MPG.2ca143ba72c6cdaf989739_at_news.individual.net>



Hi

11gR2 - have looked at the docs and see that we cannot do within a trigger (assume based on a table called mytab) something like

l_rec mytab%rowtype;

begin

  l_rec := :new;

end;

What we wanted to do was to pass the whole row to a plsql procedure whose definition was e.g.

procedure myproc (p_rec in mytab%rowtype) is
.....

I realise this is not possible and that we would need to assign all the variables explicitly e.g.

  l_rec.col1 := :new.col1;
  l_rec.col2 := :new.col2;

Tedious for 120 column tables and repeating similar code for a dozen or so tables.

Anyone come across similar requirement and is there any more codingefficient  method?

-- 
jeremy
Received on Mon Sep 16 2013 - 18:35:41 CEST

Original text of this message