Subject Re: [firebird-support] select every nth row
Author Alan.Davies@aldis-systems.co.uk
If you really want to do this you can, as follows:
select skip skipvalue yourdata from yourtable

e.g. this will give you every 10th row.
select skip 10 id, value1, value2 from bigtable

Be warned it will probably give you a nonsense result as Dimitry says.

--
Alan J Davies
Aldis



Quoting Dimitry Sibiryakov <sd@...>:

>> Have a database with a lot of data. To simplify plotting I would like to
>> "filter" every nth row. Is there a way using a select statement to
>> accomplish this?
>
> Filtering every nth row will result in wrong picture. You rather need
> min and max values of every n rows. But to accomplish that, SP also is
> the most easy way.
>
> SY, SD.
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>