• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

new to oracle How to execute Stored Procedure

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 814
Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nothing great same error we are getting.

could you please post the procedure code and execution command.

Thanks,
Praneeth
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 814
Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic