Subject | Re: [firebird-support] Firebird SP Question |
---|---|
Author | Helen Borrie |
Post date | 2006-06-03T09:49:57Z |
At 07:24 PM 3/06/2006, Luc the Auctioneer wrote:
order by ...
order by ...
separate unioned sets each having its own order, so this is the only
way I know to get that.
Myles wants to run the two queries both over the same table, and
that's OK too. No aliases needed, because you have finished with the
first cursor once you start the second query.
./heLen
>If you have a select like this:...
>
>FOR SELECT <FIELDS> from TABLE1
order by ...
>INTO <return_variables>...
>DO BEGIN
> SUSPEND;
>END
>
>FOR SELECT <FIELDS> from TABLE2
order by ...
>INTO <return_variables>It's a "mock union", Luc. With a real union, you can't get the
>DO BEGIN
> SUSPEND;
>END
>
>will retunr you all records from table1 with no values for table2 and
>then all records from table2 (with the values from the last record of
>table1).
>This doesn't seem to be anything that anyone might want, but should give
>you the idea.
separate unioned sets each having its own order, so this is the only
way I know to get that.
Myles wants to run the two queries both over the same table, and
that's OK too. No aliases needed, because you have finished with the
first cursor once you start the second query.
./heLen