Home » SQL & PL/SQL » SQL & PL/SQL » how to execute oracle procedure with OUT parameter
how to execute oracle procedure with OUT parameter [message #291416] Fri, 04 January 2008 02:34 Go to next message
gauravsunil
Messages: 68
Registered: August 2007
Location: bhubaneswar
Member
Hi experts..
I am not able to execute a procedure which uses OUT parameter..
I m providing the querry..

plz help me in providing execute statement for it...
create procedure xyz123(xyz_id in number,xyz_name out varchar2,xyz_last_name out varchar2)
is
begin
select first_name,last_name into xyz_name,xyz_last_name from employees where employee_id=xyz_id;
end;


Thanks and Regards
Sunil Gaurav
Re: how to execute oracle procedure with OUT parameter [message #291429 is a reply to message #291416] Fri, 04 January 2008 03:11 Go to previous messageGo to next message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And why are you not able to do this?
What did you try?

Regards
Michel
Re: how to execute oracle procedure with OUT parameter [message #291454 is a reply to message #291429] Fri, 04 January 2008 04:53 Go to previous messageGo to next message
gauravsunil
Messages: 68
Registered: August 2007
Location: bhubaneswar
Member
Hi Michel,

I did..
execute xyz123(100,xyz_name,xyz_last_name);

but i m getting following error..

Error starting at line 1 in command:
execute xyz123(100,xyz_name,xyz_last_name);
Error report:
ORA-06550: line 1, column 18:
PLS-00201: identifier 'XYZ_NAME' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


Please provide me correct syntax..

Thanks and Regards
Sunil Gaurav
Re: how to execute oracle procedure with OUT parameter [message #291458 is a reply to message #291416] Fri, 04 January 2008 04:58 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Please take some time to understand how it should work properly

Thumbs Up
Rajuvan.
Re: how to execute oracle procedure with OUT parameter [message #291460 is a reply to message #291454] Fri, 04 January 2008 05:13 Go to previous message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:

I did..
execute xyz123(100,xyz_name,xyz_last_name);


What are xyz_name,xyz_last_name?
Where are they declared?

Regards
Michel
Previous Topic: how to write select query
Next Topic: ORA-06502: PL/SQL: numeric or value error: host bind array too small
Goto Forum:
  


Current Time: Mon Dec 05 06:31:53 CST 2016

Total time taken to generate the page: 0.07891 seconds