procdure and function diff for this scenario [message #329045] |
Mon, 23 June 2008 23:00  |
mm_kanish05
Messages: 493 Registered: January 2007 Location: Chennai
|
Senior Member |

|
|
Hi
I am creating procedure and function like below.
Create or Replace incrementpro(a in number,b out number) is
begin
b := a+1;
end;
function
Create or Replace incrementfun(a in number,b out number) is
begin
b := a+1;
end;
both will be successfully created.
For to get the result of procedure i wrote like below
var x number
exec incrementpro(1,:x)
print x
to achieve the same in function what should i want to do.
|
|
|
|
|
|
|
Re: procdure and function diff for this scenario [message #329063 is a reply to message #329045] |
Mon, 23 June 2008 23:46   |
mm_kanish05
Messages: 493 Registered: January 2007 Location: Chennai
|
Senior Member |

|
|
Sorry Michel it is my typographical error that is missing of procedure and function.
create or replace procedure incrementpro(a in number,b out number)
.....
create or replace function incrementfun(a in number,b out number)
.....
ok now u tell me what way i can acces incrementfun. thru plsql.
thanks and sorry Michel.
kanish
[Updated on: Mon, 23 June 2008 23:50] Report message to a moderator
|
|
|
|
|
Re: procdure and function diff for this scenario [message #329069 is a reply to message #329045] |
Tue, 24 June 2008 00:04   |
flyboy
Messages: 1903 Registered: November 2006
|
Senior Member |
|
|
Now you cut it to early. The function header shall be create or replace function incrementfun(a in number,b out number)
return <datatype> . The code for its call depends on the missing part.
I just wonder, where you obtained the code for calling procedure, but firstly you shall understand it. You may find the explanation in links posted by anacedent and Michel. Then it will not be difficult for you to adjust it for function.
|
|
|
|
|
|
|