Home » SQL & PL/SQL » SQL & PL/SQL » Procedure Call
Procedure Call [message #298578] Wed, 06 February 2008 09:46 Go to next message
dheuschkel
Messages: 14
Registered: March 2007
Junior Member
Hello!

I've found a procedure which can be compiled but I dont know, how to call it.
I've tried several ways to call it, but I always get errors.
Here the code:

create or replace procedure combine_names
(
firstname IN OUT varchar2 ,
lastname IN OUT varchar2 ,
fullname_out OUT varchar2,
name_format_in IN varchar2 := 'LAST,FIRST'
)
IS
begin
--Vor und nachnamen in grossbuchstaben
firstname := UPPER(firstname);
lastname := UPPER(lastname);
IF name_format_in ='LAST, FIRST'
THEN
fullname_out := lastname || ', ' || firstname;
dbms_output.put_line(fullname_out );
ELSIF
name_format_in = 'FIRST LAST'
THEN
fullname_out := firstname || ' ' || lastname;
dbms_output.put_line(fullname_out );
END IF;
end;
/


I would like to know how to call a procedure with parameter modus IN OUT.
Thanks in Advance!
Re: Procedure Call [message #298580 is a reply to message #298578] Wed, 06 February 2008 09:52 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Use code tags around your code and format it so that it is readable.
and to call a procedure with in out parameters use an initialised variable (just like it tells you to in the documentation Wink )

Thanks

[Updated on: Wed, 06 February 2008 09:59]

Report message to a moderator

Procedure Call [message #298582 is a reply to message #298580] Wed, 06 February 2008 10:09 Go to previous messageGo to next message
dheuschkel
Messages: 14
Registered: March 2007
Junior Member
Sorry!

I think it's better to append the Script!
The window lost all Formatings.
Re: Procedure Call [message #298583 is a reply to message #298582] Wed, 06 February 2008 10:12 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
dheuschkel wrote on Wed, 06 February 2008 16:09
Sorry!

I think it's better to append the Script!
The window lost all Formatings.


Nope, do not append the script. simply place code tags around the code:
[code] your code goes here[/code]

Re: Procedure Call [message #298586 is a reply to message #298583] Wed, 06 February 2008 10:25 Go to previous message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And indent the code and take care lines don't exceed 80 characters, use "Preview" button BEFORE "Submit" one.

Quote:
I've tried several ways to call it, but I always get errors.

Which errors?

Quote:
I would like to know how to call a procedure with parameter modus IN OUT.

Declare a variable and call the procedure with it.

How is this an Expert question?

Regards
Michel
Previous Topic: Procedure to create a user (merged)
Next Topic: How to add multiple partitions to a table
Goto Forum:
  


Current Time: Wed Dec 07 20:17:11 CST 2016

Total time taken to generate the page: 0.15822 seconds