Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: help! ...compilation error running a simple procedure
It would appear that the cursor c1 is being passed a parameter.
Looking at it, the parameter which needs to be passed is the procedure parameter cl_no IN client_master.client_no%type
If so the cursor definition should read
cursor c1(cno client_master.client_no%type) is
select name from client_master where client_no=cno;
open c1; loop fetch c1 into cname; exit when c1%notfound; end loop; close c1;
end;
Ron Reidy wrote:
> dnanda wrote:
>
> > i'm in a fix ....i am trying to run a procedure which is not running on
> > sql*plus 8.0
> > create or replace procedure get_data(cl_no IN client_master.client_no%type)
> > is
> > cname client_master.name%type;
> > cursor c1(cno) is select name from client_master where client_no=cno;
>
> What type of data is a "cno"?
>
> >
> > begin
> > open c1(cl_no);
> > loop
> > fetch c1 into cname;
> > exit when getdata%notfound;
> > end loop;
> > close c1;
> > end;
> >
> > this procedure is showing compilation errors and sometimes saying that the
> > object already exists..i have also tried changing names.
>
> ------------------------------------------------------------------------
> Name: rereidy.vcf
> rereidy.vcf Type: VCard (text/x-vcard)
> Encoding: 7bit
> Description: Card for Ron Reidy
Received on Tue Apr 20 1999 - 15:36:17 CDT