how to write return in the function [message #626280] |
Fri, 24 October 2014 03:43 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi all,
Is this correct process to write return in the function? no need to write Return after End if right?
function xxc_qty_value return Number
is
v_qty number(10);
begin
if ... then
if ... then
begin
select col1
into v_qty
from table1;
return nvl(v_qty, 0);
Exception
When others then
v_qty := 0;
return v_qty;
end;
end if;
if ... then
begin
select col1
into v_qty
from table1;
return nvl(v_qty, 0);
Exception
When others then
v_qty := 0;
return v_qty;
end;
end if;
else
Begin
select col1
into v_qty
from table1;
return nvl(v_qty, 0);
Exception
When others then
v_qty := 0;
return v_qty;
end;
end if; -->Here!!!!!
end;
|
|
|
|
|
|
|
|
|
|