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: Hakan Eren <heren_at_home.com>
Date: 2000/06/23
Message-ID: <3952D901.CF78EA04@home.com>#1/1

hi,

you cannot define/restrict parameters in procedures, functions as well. try this:

SQLWKS>  create table cover_area(
     2>     STATION_ID    CHAR(6) ,
     3>     AREA_CODE     CHAR(5) not null,
     4>     primary key (station_id)
     5>   );

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

Statement processed.
SQLWKS> begin
     2>  init_cover_area('123456','12345');
     3> end;
     4> /

Statement processed.
SQLWKS> select * from cover_area

     2>
STATIO AREA_
------ -----
123456 12345
1 row selected.

regards

Hakan

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 Fri Jun 23 2000 - 00:00:00 CDT

Original text of this message

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