0

First of all I am new in Oracle stored procedures so I am not used to compiling them.

I have tried to compile the stored procedure below but got exception.

SET SERVEROUTPUT ON
DECLARE
o_res_code NUMBER;
o_res_msg VARCHAR2(500);
o_curr_blnc NUMBER;
o_prev_blnc NUMBER;
BEGIN
execute SP_SC_REDEEM ('82201026551015', 1, '4739',45478,systimestamp, systimestamp,7875,82227357776962, 1.1, 1.1,:o_curr_blnc, :o_prev_blnc, :o_res_code, :o_res_msg);
END;

EXCEPTION:

Bind Variable "o_curr_blnc" is NOT DECLARED
anonymous block completed

Can someone please correct me?

1
  • Remove execute from the code. You do not need them in scripts. Commented May 31, 2016 at 6:19

1 Answer 1

1

You have declared local variables so you don't need the colons to reference them. Also, execute is not needed in a PL/SQL block.

DECLARE
    o_res_code NUMBER;
    o_res_msg VARCHAR2(500);
    o_curr_blnc NUMBER;
    o_prev_blnc NUMBER;
BEGIN
    SP_SC_REDEEM ('82201026551015', 1, '4739',45478
       ,systimestamp, systimestamp,7875,82227357776962, 1.1, 1.1
       ,o_curr_blnc, o_prev_blnc, o_res_code, o_res_msg);
END;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.