Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can Oracle do this!?
In Oracle the keyword RETURN returns values and exits the
function. Is this what you're looking for?
In your program
FOR SELECT a, b FROM myTable
WHERE c = 'XXXX'
INTO :RA, :RB
DO BEGIN
SUSPEND; <-- Fetch all returns variables (Now with the quey
values)
RA = 'AAA';
RB = 'BBB';
SUSPEND; <-- Fetch all returns variables (Now with my values)
...
It looks like teh program will always terminate with Query
values. Doesn't suspend exit the function?
So
BEGIN
Rec_found := '00' ;
for my_rec in (SELECT a, b FROM myTable
WHERE c = 'XXXX') loop
if emp_rec.RA = '01' then
return my_rec.RB ; <- Exits
end if ;
end loop ;
return Rec_found ; <- Exits
END ;
Or some such thing?
-greg
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
Received on Tue Aug 08 2000 - 00:00:00 CDT