Received: from feivel.fam-meskes.de (postfix@h-62.96.164.59.host.de.colt.net [62.96.164.59]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA66675 for ; Mon, 1 May 2000 10:33:28 -0400 (EDT) (envelope-from michael@fam-meskes.de) Received: by feivel.fam-meskes.de (Postfix, from userid 1000) id C19282BCE3; Mon, 1 May 2000 16:11:30 +0200 (CEST) Date: Mon, 1 May 2000 16:11:30 +0200 From: Michael Meskes To: ganesanm Cc: pgsql-interfaces@postgresql.org Subject: Re: How do I select nth row from a table Message-ID: <20000501161130.A3128@fam-meskes.de> Mail-Followup-To: ganesanm , pgsql-interfaces@postgresql.org References: <38FE2289.E4A5E849@technauts.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.1.9i In-Reply-To: <38FE2289.E4A5E849@technauts.com>; from ganesanm@technauts.com on Wed, Apr 19, 2000 at 05:18:01PM -0400 X-Archive-Number: 200005/5 On Wed, Apr 19, 2000 at 05:18:01PM -0400, ganesanm wrote: > The following query works well in non-embedded sql > > select user_name > from mail_file_dtl > where grp_name = 'grp_1' > order by user_name limit 1 offset 5; It should work as well under ECPG. > I tried the following but ecpg returned error on the last > line. Sure. First of all there must not be an equal sign. And second ECPG does not accept a variable here. > Can a variable name be used in the offset option to pass > the value ? Right now: No. But surely this should be done. Michael -- Michael Meskes | Go SF 49ers! Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire! Tel.: (+49) 2431/72651 | Use Debian GNU/Linux! Email: Michael@Fam-Meskes.De | Use PostgreSQL!