Subject Re: Firebird SP Question
Author Adam
--- In firebird-support@yahoogroups.com, <myles@...> 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?

An example of what you want might be helpful, but it sounds to me like
a simple 'union all' statement, available in stock standard SQL.
Within a stored procedure you could use 2 for select statements with a
suspend inside each.

It goes without saying that the two select statements must be
selecting identically types fields.

Adam