Subject | Does FB allow ORDER BY in subselects? |
---|---|
Author | h_urlaf |
Post date | 2004-02-20T23:09:45Z |
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?
TIA,
Emiliano
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?
TIA,
Emiliano