Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: pl/sql compile error

Re: pl/sql compile error

From: Frank Hubeny <fhubeny_at_ntsource.com>
Date: 2000/06/22
Message-ID: <3952DD60.3D3997AF@ntsource.com>#1/1

When you get the message

"Warning: Procedure created with compilation errors."

after trying to compile it, you can assume that you will have trouble running it.

To find out what the problems are type "show errors" and you will probably get something like the following:

SQL> show errors
Errors for PROCEDURE INIT_COVER_AREA:

LINE/COL ERROR



1/43     PLS-00103: Encountered the symbol "(" when expecting one of the
         following:
         := ) , default varying character large
         The symbol ":=" was substituted for "(" to continue.

2/17     PLS-00103: Encountered the symbol "(" when expecting one of the
         following:
         := ) , default varying character large
         The symbol ":=" was substituted for "(" to continue.


Although this may be cryptic at first, it is complaining about the "(6)" and "(5)" . If you remove them, you will be able to compile the procedure as follows:

SQL> create or replace procedure init_cover_area (station_id char,   2 area_code char) as
  3 begin
  4 insert into cover_area values(station_id, area_code);   5 end;
  6 /

Procedure created.

The manual, PL/SQL User's Guide and Reference (a67842.pdf), in chapter 7, provides some other examples.

Frank Hubeny

junfan wrote:

> Hi all
>
> I am a newbie to oracle. I just try to code some pl/sql program but
> frustrated by some simple mistakes as follows
>
> SQL> drop table cover_area;
>
> Table dropped.
>
> SQL> create table cover_area(
> 2 STATION_ID CHAR(6) references station,
> 3 AREA_CODE CHAR(5) not null,
> 4 primary key (station_id)
> 5 );
>
> Table created.
> SQL> create or replace procedure init_cover_area (station_id char(6),
> 2 area_code char(5)) as
> 3 begin
> 4 insert into cover_area values(station_id, area_code);
> 5 end;
> 6 /
>
> Warning: Procedure created with compilation errors.
>
> SQL> call init_cover_area('123456','12345');
> call init_cover_area('123456','12345')
> *
> ERROR at line 1:
> ORA-06575: Package or function INIT_COVER_AREA is in an invalid state
>
> I will be appreciated for any instruction.
>
> Regards
Received on Thu Jun 22 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US