Re: Add a ROWCOUNT to the output of a select.

From: Marcin Stępnicki <mstepnicki(at)gmail(dot)com>
To: "Harald Fuchs" <hari(dot)fuchs(at)googlemail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Add a ROWCOUNT to the output of a select.
Date: 2008-05-14 08:48:34
Message-ID: 179149fe0805140148r49c2c5a3o5f944ce49b81049e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, May 14, 2008 at 10:40 AM, Harald Fuchs
<hari(dot)fuchs(at)googlemail(dot)com> wrote:
> I think a sequence is much simpler:
>
> create temp sequence tmp;
> select nextval('tmp') as rownum,
> contactdate
> from
> myTable
> where
> contactdate > '2007-06-30 23:59:59'
> order by
> contactdate;

I used to do it this way myself, but the solution in my previous post
is really worth the trouble.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Robins Tharakan 2008-05-14 10:01:54 Re: Add a ROWCOUNT to the output of a select.
Previous Message Harald Fuchs 2008-05-14 08:40:17 Re: Add a ROWCOUNT to the output of a select.