Re: Stored Procedures
Posted in 1998
The short answer is...you really can't. If you'd like to have a stored
procedure return a single value then you could always fake it by calling it
as a function from a select statement:
select name, is_person_cool ( name ) is_cool
from people;
where is_person_cool is defined as:
create procedure is_person_cool ( name varchar(20) default '~' )
returning varchar(6);define is_cool varchar(6);
if name = 'Bob' then
let is_cool = 'Yes';
elif name = '~' then
let is_cool = 'Unsure';
elif name is null then
let is_cool = 'Unsure';
else
let is_cool = 'No';
end if
return is_cool;
end procedure;
Which probably is no where as robust as you'd like.
Regards,
bc
Chris Jessen wrote:
> I'm currently writing stored procedures in ODS 7.3. Does anyone have a
> suggestion about returning field names with my resultsets???
>
> -Chris