Subject Re: [firebird-support] Firebird SP Question
Author Helen Borrie
At 12:41 PM 3/06/2006, you wrote:
>Is it possible to have a stored procedure in FB execute two separate SELECT
>statements, and return a merged set of results back? Forgive me being a
>newbie to creative SELECT statements in SQL, but I have a set of data that I
>can get with one select statement, and then another set of data from the
>same table with another SELECT statement, and I want to return these back
>from the stored procedure in a sorted order so that the first set of results
>appear first, and the 2nd set of results are 'appended' onto the set.
>
>Can this be done?

Absolutely, it's the only way I know to get a "union" set where the
contributing sets are ordered separately.

Just have two separate, ordered FOR SELECT into [variables] do
SUSPEND loops, one following the other. The "into" variables will be
used for both.

./heLen