• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

new to oracle How to execute Stored Procedure

 
praneeth ram
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all, i have the bellow stored procedure how to execute it.



> Procedure created.

No i am trying to run it
> exec myproc1 (john)

i am getting the bellow error

*


Can any one help me how to run the above one.
Thanks,
Praneeth
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to execute below code and let us know


 
praneeth ram
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nothing great same error we are getting.

could you please post the procedure code and execution command.

Thanks,
Praneeth
 
Fatih Keles
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

a variable named john is looked for but can not be found.

This one will work.

 
Ninad Kulkarni
Ranch Hand
Posts: 802
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@praneeth
As explained by Fatih you need to send varchar2 type parameter in procedure
 
praneeth ram
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ninad Kulkarni,Fatih Keles I got the solution. please find it bellow. thanks for replying.

Step:1


After creation of the above stored procedure. Now declare one bind variable in the sql prompt.

Step:2


Now call the StoredProcedure by passing the "name" and the bind variable.

Step:3


PL/SQL procedure successfully completed.
After execution of the above command the output is stored in bind variable. Now print the bind variable

Step:4

*****output********
D
---------------
sai1

So Finally i got the expected solution for the stored procedure. Ninad Kulkarni,Fatih Keles thanks for replying for my query.


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic