Errors in Creating Oracle packages

10 pts.
Tags:
Oracle
Oracle development
Oracle Package
Oracle SQL
Can anybody plz find out the error in the following code?? plz reply back. SQL> CREATE OR REPLACE package body PKG_IMAGEM1 2 as 3 PROCEDURE IMGINSERT1(P_Region IN VARCHAR2, 4 P_College IN VARCHAR2, 5 P_CourseCat in varchar2, 6 P_CourseName in varchar2, 7 P_StudentName in varchar2, 8 P_ID in varchar2, 9 P_FileName in varchar2, 10 P_IMG IN BLOB); 11 Insert into DocumentsSubmitted(RegionCode,CollegeCode, CourseCategory, CourseName, StudentFullN ame, ID, FileName, ImageField) values(P_Region,P_College,P_CourseCat, P_CourseName, P_StudentName, P _ID, P_FileName, P_IMG ); 12 END PKG_IMAGEM1; 13 / Warning: Package Body created with compilation errors. SQL> show err; Errors for PACKAGE BODY PKG_IMAGEM1: LINE/COL ERROR -------- ----------------------------------------------------------------- 11/1 PLS-00103: Encountered the symbol "INSERT" when expecting one of the following: begin end function package pragma procedure subtype type use <an identifier> <a double-quoted delimited-identifier> form current cursor The symbol "begin" was substituted for "INSERT" to continue. SQL>

Answer Wiki

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

There is more than one error:

- Remove the semicolon and add the IS (or AS) and BEGIN keywords after the signature definition of the procedure.
- Add the END keyword corresponding to the end of the procedure.

This would be the modified script:

<pre>CREATE OR REPLACE package body PKG_IMAGEM1
as
PROCEDURE IMGINSERT1(P_Region IN VARCHAR2,
P_College IN VARCHAR2,
P_CourseCat in varchar2,
P_CourseName in varchar2,
P_StudentName in varchar2,
P_ID in varchar2,
P_FileName in varchar2,
P_IMG IN BLOB) IS
BEGIN
Insert into DocumentsSubmitted(RegionCode,CollegeCode, CourseCategory, CourseName, StudentFullN
ame, ID, FileName, ImageField) values(P_Region,P_College,P_CourseCat, P_CourseName, P_StudentName, P
_ID, P_FileName, P_IMG );
END;

END PKG_IMAGEM1;
/</pre>

Discuss This Question:  

 
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

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