Skip site navigation (1) Skip section navigation (2)

Re: How do I select nth row from a table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ganesanm <ganesanm(at)technauts(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: How do I select nth row from a table
Date: 2000-04-20 03:14:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
ganesanm <ganesanm(at)technauts(dot)com> writes:
> How can I incorporate this query in  an  embedded sql ??

> I tried  the following but ecpg returned error on the last
> line.

>  exec sql
>         select  mfl_size into :mfl_size
>         from mail_file_dtl
>         where mfl_recipient = :mfl_recipient
>         order by mfl_file_name  limit 1 offset = :nNumber ;

> Can a variable name be used in the offset option to pass
> the value ?

It looks like not, at the moment.  I think the grammar for ecpg
needs to accept a "cvariable" in places where the underlying
backend grammar only accepts an ICONST.  It's probably too late
to fix this for 7.0, but it should be a todo item for 7.1...

			regards, tom lane

In response to


pgsql-interfaces by date

Next:From: Ivo SimicevicDate: 2000-04-20 07:24:54
Subject: Re: Inserting NULL with pgaccess
Previous:From: Lincoln YeohDate: 2000-04-20 02:59:07
Subject: Re: Connecting website with SQL-database.....

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group