how can i resolve oracle error 00103

5 pts.
Tags:
Oracle 9i
Oracle error messages
PL/SQL
I am getting the following error when running the below procedure from TOAD. I have ora 9i OS Windoes XP. CREATE OR REPLACE PROCEDURE SP_CALL_PROCEDURE22 (BUSINESS_UNIT1 in varchar2) IS CURSOR C1 IS SELECT BUSINESS_UNIT,VOUCHER_ID,INVOICE_ID,VENDOR_ID,GROSS_AMT FROM PS_VOUCHER WHERE BUSINESS_UNIT= BUSINESS_UNIT1; C C1%ROWTYPE; BEGIN FOR C IN C1 LOOP BEGIN INSERT INTO SYSADM.voucher_tmp values (C.BUSINESS_UNIT,C.VOUCHER_ID,C.INVOICE_ID); COMMIT; END LOOP; END; (14,4)ORACLE ERROR 00103.PLS-00103: Encountered the symbol ";" when expecting one of the following:loop

Answer Wiki

Thanks. We'll let you know when a new response is added.

I am far from an expert in PL/SQL, but I believe you need to have an “END;” prior to the END LOOP: to match your Begin statement.

ie
COMMIT;
END;
END LOOP;
END;
/

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    I would remove the unmatched begin since it is not necessary, unless an exception handler is going to be added for the insert statement.
    ...
    FOR C IN C1 LOOP
         INSERT INTO SYSADM.voucher_tmp values (C.BUSINESS_UNIT,C.VOUCHER_ID,C.INVOICE_ID);
         COMMIT;
    END LOOP;
    END;
    69,835 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following