Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Syntax a Package with Procedures in Oracle. Any Ideas?
In article <f2F03.764$S6.99452_at_news.uswest.net>, James Thompson
<james.thompson_at_noridian.com> writes
>Two Questions.
>
>1.)What is the correct syntax for creating a package that contains
>procedures inside of it?
[snip]
>END EE_PACKAGE;
>CREATE PACKAGE BODY EE_PACKAGE AS
I assume that you are just loading the above script using SQL*PLUS or
similar?
The problem is that you haven't told the system to run the first create statement before you've handed it the second one. It is still parsing the statement and knows that the second use of the word 'CREATE' is wrong there.
Simple fix, from the above...
>END EE_PACKAGE;
/
>CREATE PACKAGE BODY EE_PACKAGE AS
The '/' tells system to run the command stored in the buffer so far i.e.
the first create command. It can then continue with the second create
command.
--
Andy Hardy. PGP key available on request
![]() |
![]() |