X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A87B1474E5C for ; Wed, 12 Feb 2003 13:12:31 -0500 (EST) Received: from localhost.localdomain (Bb9cb.pppool.de [213.7.185.203]) by postgresql.org (Postfix) with ESMTP id A2CA2474E44 for ; Wed, 12 Feb 2003 13:12:29 -0500 (EST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id h1CIAca04600 for ; Wed, 12 Feb 2003 19:10:39 +0100 Content-Type: text/plain; charset="us-ascii" From: Nicholas Allen To: pgsql-sql@postgresql.org Subject: How do you select from a table until a condition is met? Date: Wed, 12 Feb 2003 19:10:38 +0100 User-Agent: KMail/1.4.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200302121910.38232.nallen@freenet.co.uk> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/244 X-Sequence-Number: 11642 Hi, I am hoping that someone can help me with a problem I have. I would like to= be=20 able to perform a SELECT query to select values from a table upto a certain= =20 row. The select may be ordered on a number of items. Is it possible to do= =20 this and how should I do it? The reason I need this is because I have created a virtual table browser cl= ass=20 that performs SQL queries to get the sections of the table the user is=20 interested in. This way I don't load the whole table onto the client side. = If=20 the user changes the sort ordering I want to determine the row index that w= as=20 previously selected and scroll to that location. Any help would be very much appreciated. Thanks in advance, Nicholas Allen