Subject | Re: [firebird-support] Re: Newbie Questions |
---|---|
Author | Martijn Tonies |
Post date | 2004-04-01T12:45:46Z |
Hi,
resultset, with the same columns.
You can, however, do stuff like this:
procedure with output parameters (o1, o2, o3, o4)
as
begin
/* return everything from a first SELECT */
for select ... from
into :o1, :o2, :o3, :o4
do suspend;
/* return more from a second select */
for select ... from
into :o1, :o2, :o3, :o4
do suspend;
end
Or do stuff like:
create procedure myproc returns (output_col varchar(20) )
as
begin
output_col = 'test';
suspend;
output_col = '-------';
suspend;
output_col = 'For something';
suspend;
end
Etc...
Doing a SELECT * FROM myproc will return a 3-row
resultset.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> Many thanks for your help much appreciated.Multiple separated resultsets aren't supported. It's always a single
>
> So to do a simply select, I must return values. Then how would a
> stored procedure with multiple recordsets work? Or is this not an option?
resultset, with the same columns.
You can, however, do stuff like this:
procedure with output parameters (o1, o2, o3, o4)
as
begin
/* return everything from a first SELECT */
for select ... from
into :o1, :o2, :o3, :o4
do suspend;
/* return more from a second select */
for select ... from
into :o1, :o2, :o3, :o4
do suspend;
end
Or do stuff like:
create procedure myproc returns (output_col varchar(20) )
as
begin
output_col = 'test';
suspend;
output_col = '-------';
suspend;
output_col = 'For something';
suspend;
end
Etc...
Doing a SELECT * FROM myproc will return a 3-row
resultset.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com