Subject | Re: Some Basic ?s |
---|---|
Author | Svein Erling |
Post date | 2003-09-01T10:14:06Z |
Well, then the result will be random amongst those finishing shared 22nd (o=
r 21st) unless you have some other way of ordering them.
By nesting NOT EXISTS/EXISTS it is normally possible to get exactly what yo=
u want, but rank 22nd could mean a select 22 levels deep, so using a stored =
procedure does sound like a very good alternative if you want to list all wh=
o ends up shared 22nd. ;o)
Maybe things can be simplified in 1.5, but I do not know whether
'SELECT ... WHERE RANK = (SELECT FIRST 1 SKIP 21 ...)' is allowed or not (o=
r whether 'WHERE <something> = <subselect>' still is too time consuming).
Set
Alan McDonald wrote:
r 21st) unless you have some other way of ordering them.
By nesting NOT EXISTS/EXISTS it is normally possible to get exactly what yo=
u want, but rank 22nd could mean a select 22 levels deep, so using a stored =
procedure does sound like a very good alternative if you want to list all wh=
o ends up shared 22nd. ;o)
Maybe things can be simplified in 1.5, but I do not know whether
'SELECT ... WHERE RANK = (SELECT FIRST 1 SKIP 21 ...)' is allowed or not (o=
r whether 'WHERE <something> = <subselect>' still is too time consuming).
Set
Alan McDonald wrote:
> what about ties?
>
> > Svein Erling Tysvær wrote:
> >
> > > 4.How to fetch a n th row in a table (or in a SELECT
> > > statement) Eg. The student whose rank is 22)
> >
> > try something like
> > SELECT FIRST 1 SKIP 21 RANK, STUDENT
> > FROM STUDENTS
> > WHERE <some limiting criteria>
> > ORDER BY RANK