pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: ganesanm <ganesanm@technauts.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: How do I select  nth row from a table
Date: Mon, 1 May 2000 16:11:30 +0200
Message-ID: <20000501161130.A3128@fam-meskes.de> (raw)
In-Reply-To: <38FE2289.E4A5E849@technauts.com>
References: <38FE2289.E4A5E849@technauts.com>

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!



view thread (4+ messages)  latest in thread

Message-ID: <20000501161130.A3128@fam-meskes.de>
Permalink:  ../20000501161130.A3128@fam-meskes.de/
Also on:    postgresql.org/message-id/20000501161130.A3128@fam-meskes.de

 · 

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: meskes@postgresql.org, ganesanm@technauts.com
  Subject: Re: How do I select  nth row from a table
  In-Reply-To: <20000501161130.A3128@fam-meskes.de>

* 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