Re: FW: Count & Distinct

From: "Ryan Williams" <shrewsbury(at)louisiana(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: FW: Count & Distinct
Date: 2000-08-24 17:35:49
Message-ID: 005501c00df1$c1df2500$c330cc40@crusher
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I find that if I create the table described in the email, in psql I recieve
'ERROR: Attribute 'row' not found'...

But this isn't exactly 'ERROR: parser: parse error at or near
"distinct"'...

----- Original Message -----
From: "John McKown" <jmckown(at)prodigy(dot)net>
To: "anuj" <Anuj(at)in-control(dot)de>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, August 24, 2000 4:55 AM
Subject: Re: FW: [GENERAL] Count & Distinct

> I'm confused, your SELECT uses the variable "row", but there is no such
> variable in your table?
>
> John
>
> On Thu, 24 Aug 2000, anuj wrote:
>
> >
> >
> > > >>> select count(distinct(row)) from table;
> > hi,
> > I have also tried but I am geting an error.
> >
> > ***************
> > tempdb=> \d tbltemp
> > Table = tbltemp
> >
+----------------------------------+----------------------------------+-----
> > --+
> > | Field | Type |
> > Length|
> >
+----------------------------------+----------------------------------+-----
> > --+
> > | id | int4 |
> > 4 |
> > | name | varchar() |
> > 40 |
> >
+----------------------------------+----------------------------------+-----
> > --+
> > tempdb=> select count(distinct(row)) from tbltemp;
> > ERROR: parser: parse error at or near "distinct"
> > tempdb=>
> > ***************
> >
> > Thanks
> > Anuj
> >
> >
> > -----Original Message-----
> > From: pgsql-general-owner(at)hub(dot)org [mailto:pgsql-general-owner(at)hub(dot)org]On
> > Behalf Of sridhvenk(at)yahoo(dot)com
> > Sent: Wednesday, August 23, 2000 9:12 AM
> > To: J. Atwood
> > Cc: pgsql-general(at)postgresql(dot)org
> > Subject: Re: [GENERAL] Count & Distinct
> >
> >
> > It works fine. Please try again
> >
> >
> >
> >
> > On Wed, 23 Aug 2000, J. Atwood wrote:
> >
> > > Search a lot of archives and have come up with very little (much old)
> > >
> > > obviously
> > >
> > > >>> select count(distinct(row)) from table;
> > >
> > > Does not work so what is the work around? I have tried a bunch of
stuff.
> > >
> > > Thanks,
> > > J
> > >
> > >
> >
> >
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John McKown 2000-08-24 17:42:20 Re: Importing into Postgres from a csv file
Previous Message Peter Mount 2000-08-24 17:23:11 Re: No Suitable Driver