How do I call a Oracle Stored Proc from a Insert Trigger

II created an insert trigger on a table that needs to call a stored proc to update the coresponding record on another table.  I get a PLS-00049 : bad bind value variable 'P'
TRIGGER TRI_DD200APPROVALACTIONS 
AFTER INSERT ON DD200APPROVALACTIONS 
 FOR EACH ROW 
DECLARE
  P NUMBER;
BEGIN
  IF INSERTING THEN
  
      P := :new.DDAPPVACTID;
      
      Trig_UpdFLIPLSig(:P);

  END IF;
  
  END;

Open in new window

MichBmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sventhanCommented:
CREATE OR REPLACE my_procedure (p_variable1 IN my_table.column1%type, p_variable2 IN my_table.column2%type, p_out OUT number)
AS BEGIN p_out := p_variable1 + p_variable2 ;
END ;
/

CREATE OR REPLACE TRIGGER my_test_trigger BEFORE INSERT ON my_table
DECLARE v_out number ;
BEGIN my_procedure(:new.column1, :new.column2, v_out) ; :new.column3 := v_out ;
END;
/


To test:

 INSERT INTO my_table VALUES (5, 20) ;

http://searchoracle.techtarget.com/answer/Calling-a-stored-procedure-from-a-trigger

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MichBmanAuthor Commented:
I removed the : infront of the P and it worked.
sventhanCommented:
@MichBman -

Is there anything wrong with my answer and the reference link? I've give you the exact answer and I cannot accept your comments.

Thanks,

~sve.
South ModModeratorCommented:
All,
 
Following an 'Objection' by sventhan (at http://www.experts-exchange.com/Q_26700021.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
 
At this point I am going to re-start the auto-close procedure.
 
Thank you,
 
SouthMod
Community Support Moderator
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.