Subject Re: [firebird-support] Does FB allow ORDER BY in subselects?
Author Daniel Rail
Hi,

At February 20, 2004, 19:09, h_urlaf wrote:

> Hi,

> I have a table with usernames and times when they last accessed a
> system (a timestamp). I need to have the last 10 users to access the
> system in alphabetical order, so I figured I'd do something like

> SELECT * FROM (SELECT FIRST 10 USERNAME FROM USERS ORDER BY ACCESS
> DESC) ORDER BY USERNAME;

> but that didn't work. Is something like this possible at all? Must I
> do one of the two sorting phases in the application?

Subselects are not possible at the moment, it might be included in a
point release after version 1.5, unless it's only going to be in FB2.0
(the change is already in the code post FB 1.5). And, don't ask when
the point release or FB 2.0 will be released, because FB 1.5 has just
been officially released.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)