Home » SQL & PL/SQL » SQL & PL/SQL » Row as input to a procedure. (Oracle 10G)
icon9.gif  Row as input to a procedure. [message #295209] Mon, 21 January 2008 13:52 Go to next message
lazreg.sani
Messages: 1
Registered: January 2008
Junior Member
Hi everyone,
I've got a small problem with a basic thing in plsql. can anyone help me please??

My problem is this.

I've created a package procedure with a prototype like this:

PROCEDURE myProcedure(procInput MyTable%RowType);

I've created a body and I would like to be able to call this method from a trigger on the table MyTable and supplying as parameter the newly inserted row.
On MyTable I have an after insert row calling

pck_name.myProcedure(:new)

but it doesn't work and I don't understand why. Can anyone help me please ?

Thanks in advance.
sani
Re: Row as input to a procedure. [message #295213 is a reply to message #295209] Mon, 21 January 2008 14:06 Go to previous message
pablolee
Messages: 2836
Registered: May 2007
Location: Scotland
Senior Member
It doesn't work because this is not how it is meant to work.
When using :NEW.anything a record is not acceptable, you must reference the columns individually. (you could always populate a record by using the individual :new.column values if you wanted to.
Previous Topic: Searching by dates
Next Topic: View Help
Goto Forum:
  


Current Time: Sat Dec 10 20:19:59 CST 2016

Total time taken to generate the page: 0.09715 seconds