Re: help on SQL
От | Bruno Wolff III |
---|---|
Тема | Re: help on SQL |
Дата | |
Msg-id | 20040421175154.GA30712@wolff.to обсуждение исходный текст |
Ответ на | Re: help on SQL (Gergely Czuczy <phoemix@harmless.hu>) |
Список | pgsql-interfaces |
On Wed, Apr 21, 2004 at 12:21:32 +0200, Gergely Czuczy <phoemix@harmless.hu> wrote: > hello > > what you have done is not the thing that was asked. you've retrieved every > row that has a spacial value(data-1 %3). the request was to retrieve every > 3rd row. the difference is that, the 'every Nth' row has nothing to do > with the value of any field in the row. try to retrieve every Nth row from > a query where there are no integer values, only timestamps and string. or > try to do your method where the integer value is not continous. Rows do not have any order. Unless you define the ordering you want in terms of same data in the rows there is no every other row. If you can order the rows (no randomly breaking ties) then you can get the number of the row in this ordering (though not by a very efficient method) and select rows based on the this number.
В списке pgsql-interfaces по дате отправления: