Unix Technical Forum

PLS 00103 error when creating package/body

This is a discussion on PLS 00103 error when creating package/body within the Oracle Miscellaneous forums, part of the Oracle Database category; --> This is the code: CREATE or REPLACE PACKAGE wishlist IS PROCEDURE p_wishlist (customer number, isbn varchar2); -- Adding Information ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-07-2008, 09:58 PM
Maria J
 
Posts: n/a
Default PLS 00103 error when creating package/body

This is the code:

CREATE or REPLACE PACKAGE wishlist
IS
PROCEDURE p_wishlist (customer number, isbn varchar2); -- Adding
Information to Wish List
END wishlist;

-- Creating Package Body for Bookstore Purchases/Holds
CREATE or REPLACE PACKAGE BODY wishlist
AS
PROCEDURE p_wishlist(CUSTOMER number, ISBN varchar2)
IS
BEGIN
Insert into tbl_wishlist
VALUES(CUSTOMER, ISBN);
COMMIT;
END;
/

I am getting a PLS 00103 - Encountered the Symbol "CREATE" - at line 6
(where the body begins).

I am butting my head on the table here - what obvious thing am I
missing?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-07-2008, 09:58 PM
Sybrand Bakker
 
Posts: n/a
Default Re: PLS 00103 error when creating package/body

On 27 Jul 2004 19:11:06 -0700, mjenson43@cambridgecollege.edu (Maria
J) wrote:

>This is the code:
>
>CREATE or REPLACE PACKAGE wishlist
>IS
>PROCEDURE p_wishlist (customer number, isbn varchar2); -- Adding
>Information to Wish List
>END wishlist;
>
>-- Creating Package Body for Bookstore Purchases/Holds
>CREATE or REPLACE PACKAGE BODY wishlist
>AS
> PROCEDURE p_wishlist(CUSTOMER number, ISBN varchar2)
>IS
>BEGIN
> Insert into tbl_wishlist
> VALUES(CUSTOMER, ISBN);
>COMMIT;
>END;
>/
>
>I am getting a PLS 00103 - Encountered the Symbol "CREATE" - at line 6
>(where the body begins).
>
>I am butting my head on the table here - what obvious thing am I
>missing?


a / after the package definition.

You also shouldn't commit in procedures.


--
Sybrand Bakker, Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-07-2008, 09:58 PM
Maria J
 
Posts: n/a
Default Re: PLS 00103 error when creating package/body

Thanks!

Sybrand Bakker <sybrandb@hccnet.nl> wrote in message news:<srbeg01ia6v5nn1p0f61ogn193t70vq2me@4ax.com>. ..
> On 27 Jul 2004 19:11:06 -0700, mjenson43@cambridgecollege.edu (Maria
> J) wrote:
>
> >This is the code:
> >
> >CREATE or REPLACE PACKAGE wishlist
> >IS
> >PROCEDURE p_wishlist (customer number, isbn varchar2); -- Adding
> >Information to Wish List
> >END wishlist;
> >
> >-- Creating Package Body for Bookstore Purchases/Holds
> >CREATE or REPLACE PACKAGE BODY wishlist
> >AS
> > PROCEDURE p_wishlist(CUSTOMER number, ISBN varchar2)
> >IS
> >BEGIN
> > Insert into tbl_wishlist
> > VALUES(CUSTOMER, ISBN);
> >COMMIT;
> >END;
> >/
> >
> >I am getting a PLS 00103 - Encountered the Symbol "CREATE" - at line 6
> >(where the body begins).
> >
> >I am butting my head on the table here - what obvious thing am I
> >missing?

>
> a / after the package definition.
>
> You also shouldn't commit in procedures.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:56 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com