Subject RE: [firebird-support] Re: Some Basic ?s
Author Alan McDonald
I think there are probably better ways of getting this result than pure
SQL - the client interface could be quite smart here too.
Alan

> -----Original Message-----
> From: Svein Erling [mailto:svein.erling.tysvaer@...]
> Sent: Monday, 1 September 2003 8:14 PM
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] Re: Some Basic ?s
>
>
> 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:
> > 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
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>