pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Gergely Czuczy <phoemix@harmless.hu>
Cc: Michael Stephenson <mstephenson@tirin.openworld.co.uk>
Cc: Kenneth Suralta <ksuralta@ntsp.nec.co.jp>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: help on SQL
Date: Wed, 21 Apr 2004 12:51:54 -0500
Message-ID: <20040421175154.GA30712@wolff.to> (raw)
In-Reply-To: <Pine.LNX.4.44.0404211219360.30186-100000@localhost>
References: <Pine.LNX.4.58.0404210952400.29792@tirin.openworld.co.uk>
	<Pine.LNX.4.44.0404211219360.30186-100000@localhost>

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.



view thread (8+ messages)

Message-ID: <20040421175154.GA30712@wolff.to>
Permalink:  ../20040421175154.GA30712@wolff.to/
Also on:    postgresql.org/message-id/20040421175154.GA30712@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: bruno@wolff.to, phoemix@harmless.hu, mstephenson@tirin.openworld.co.uk, ksuralta@ntsp.nec.co.jp
  Subject: Re: help on SQL
  In-Reply-To: <20040421175154.GA30712@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox