Subject Re: order-by problem
Author Adam
--- In firebird-support@yahoogroups.com, "martinknappe" <martin@...>
wrote:
>
> ok, so i figure a table that's created as the result of an sp can't be
> ordered by anything...but is there no way to simply REVERSE the order
> of the entries in a result table once they've all been suspended?

Simply not true on several records.

1. Unless you issue a create table statement inside an execute
statement directive, you can not 'create a table as the result of an
sp'. I assume you mean a resultset / recordset / dataset.

2. You can include anything returned by a stored procedure through the
suspend statement using the stock standard order by statement. eg

select ID
from MyProc
order by ID desc

Of course, the entire recordset will need to be gone through before
you get your first record, so I wouldnt be trying such logic with 100
million records, but you can probably get away with a couple of hundred.

Adam