Re: FW: [GENERAL] Count & Distinct

2000-08-27 Thread Nils Zonneveld
anuj wrote: > > > >>> select count(distinct(row)) from table; > hi, > I have also tried but I am geting an error. > It's true that you get an error from trying to execute the query above; 'distinct' is not a function but a keyword, count() is a agregate function. Following this the correct not

Re: FW: [GENERAL] Count & Distinct

2000-08-24 Thread Stephan Szabo
Yeah, There is no column 'row'. You're trying to use 'row' as the value expression. Postgres figures it's a column reference and tries to find it (and doesn't). ::= [] Set function type is COUNT, set quantifier is DISTINCT, 'row' is not a valid value expression in this case. Note also,

Re: FW: [GENERAL] Count & Distinct

2000-08-24 Thread Ryan Williams
I'm running 7.0.2 (or at least I believe so). Is there something that /I/ may be doing wrong? - Original Message - From: "Ross J. Reedstrom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 24, 2000 8:44 AM Subject: Re: FW: [GENERAL] Count &a

Re: FW: [GENERAL] Count & Distinct

2000-08-24 Thread Ross J. Reedstrom
On Thu, Aug 24, 2000 at 10:35:49AM -0700, Ryan Williams wrote: > 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"'... Right, that's the error you ge

Re: FW: [GENERAL] Count & Distinct

2000-08-24 Thread Ryan Williams
" <[EMAIL PROTECTED]> To: "anuj" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> 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 > variabl

Re: FW: [GENERAL] Count & Distinct

2000-08-24 Thread John McKown
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=