On 16 Jul 2002, at 21:39, Robo wrote:
I want the latest (highest) iSession to be selected:
SELECT iSession FROM O_Sessions GROUP BY iUser
Because of GROUP BY, allways the first(!) recordset for iUser is
selected. But i want the last recordset to be selected :-(
I'm not sure what you
Well if you want the latest and greatest iSession irrespective of the user
use
select max(iSession) from O_Sessions;
If it is to be grouped by user, then
select user, max(iSession) from O_Sessions group by user;
This will give you the max iSession for a user.
Regards
Satish
-Original
Have you tried something like this,
SELECT iSession FROM O_Sessions GROUP BY iUser ORDER BY iSessions DESC;
Mike
- Original Message -
From: Robo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 16, 2002 3:39 PM
Subject: ??? Simple sql-question: SELECT iSession FROM