Subject Re: [Firebird-Architect] transient data sets and procedures
Author Ann W. Harrison
Whoops! There's a typo in the procedure definition in the example...

> create procedure fattest_cats (counter integer)
> returns (name varchar (30), age integer, salary integer)
> as
> declare fatter_cats transient data set

should be
declare fat_cats transient data set

> (name varchar (30), age integer, salary integer);
> begin
> for select first :counter f.name, f.age, f.salary
> from fat_cats f
> join health_records hr
> on (f.name = hr.name and f.age = hr.age)
> order by hr.weight descending
> into :name, :age, :salary
> do begin
> suspend;
> end
> end
>
>
> Here's a segment of application pseudo code..
>
>
> ...
> select p.name, p.age, p.salary
> from people p
> where p.salary > 100000
> yielding fat_cats;
>
> select fc.name, fc.age, fc.salary
> from fat_cats (5) yielding fat_cats;
>