Subject Re: [firebird-support] Select records by their position
Author Magno Machado
>
> There is no "position" in a table, there's only a "position" in a
> resultset
> that's
> ordered.

Ok. So i'll rewrite my question:
Is it possible to select some records from a resultset based on their
positions?
I think it's the same idea used by the first/skip clauses. Am I wrong?


> > f.e.:
> > F.e., if I want only the 1st, 2nd, 80th and 100th record from a table.
> > I know the first/skip clauses, but they don't solve my problem(AFAIK)
>
> Why not?


Hum..
I thought it work with a range only... F.e., if I want the 2nd, 3rd and 4th
rows I can use "select first 3 skip 1 .............."
But if I want the 2nd and 4th only?







2007/8/16, Martijn Tonies <m.tonies@...>:
>
>
>
> > Is it possible to select some records from a table based on their
> positions?
>
> There is no "position" in a table, there's only a "position" in a
> resultset
> that's
> ordered.
>
> > f.e.:
> > F.e., if I want only the 1st, 2nd, 80th and 100th record from a table.
> > I know the first/skip clauses, but they don't solve my problem(AFAIK)
>
> Why not?
>
> Martijn Tonies
> Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle
> &
> MS SQL Server
> Upscene Productions
> http://www.upscene.com
> My thoughts:
> http://blog.upscene.com/martijn/
> Database development questions? Check the forum!
> http://www.databasedevelopmentforum.com
>
>
>


[Non-text portions of this message have been removed]