10 pts.
 Errors in Creating Oracle packages
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>

Software/Hardware used:
ASKED: February 9, 2009  1:04 PM
UPDATED: February 9, 2009  2:12 PM

Answer Wiki:
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>
Last Wiki Answer Submitted:  February 9, 2009  2:12 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _