Re: help: can't create package

From: <cary_at_nams.net>
Date: Wed, 28 Oct 1998 15:20:28 GMT
Message-ID: <717cns$bim$1_at_nnrp1.dejanews.com>


Hello,

  I'm pretty new to SQL+ and PL/SQL myself and encountered this same problem 2 days ago. The solution is simple -> just put a / on a line by itself between 'end test_package;' and 'create package body test package is'. What's happening here is that the first create issued from SQL+ puts you in PL/SQL mode, but create is not a valid PL/SQL command, so the system balks at the second create. The / is necessary so that the first create statement is completed and executed, at which point you get back to SQL+ mode, where you can issue the second create statement. Hope this helps.

Cary

In article <713500$hog$1_at_nnrp1.dejanews.com>,   badstreetboy_at_my-dejanews.com wrote:
> I have a simple package doesn't compile and gave me the following errors:
>
> Errors for PACKAGE TEST_PACKAGE:
> 5/1 PLS-00103: Encountered the symbol "CREATE"
>
> What is this err about? thanks.
>
> ---
> create package test_package is
> procedure p1(input_num integer);
> end test_package;
>
> create package body test_package is
>
> procedure p1(input_num integer)
> is
> result integer;
> begin
> result:=input_num;
> dbms_output.put_line('result: ' || result);
> end p1;
>
> end test_package;
> /
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Oct 28 1998 - 16:20:28 CET

Original text of this message