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

Re: count(1) return 0?

From: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>
To: Zak McGregor <zak(at)mighty(dot)co(dot)za>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: count(1) return 0?
Date: 2004-03-01 01:13:07
Message-ID: 40428E23352.B2CDKG@129.180.47.120 (view raw or flat)
Thread:
Lists: pgsql-general
On Mon, 1 Mar 2004 02:14:56 +0200, Zak McGregor <zak(at)mighty(dot)co(dot)za> wrote:
> to return a 0 value instead of absolutely nothing if no rows match fixture=4916
> and winner=away? I get absolutely no results at all.
> 
> any ideas please?

dont group by winner.  it's not returned in the statement so it's not
needed anyway.  an exact value is specified in the where clause so it's
not going to be different either.

klint.

+---------------------------------------+-----------------+
: Klint Gore                            : "Non rhyming    :
: EMail   : kg(at)kgb(dot)une(dot)edu(dot)au           :  slang - the    :
: Snail   : A.B.R.I.                    :  possibilities  :
: Mail      University of New England   :  are useless"   :
:           Armidale NSW 2351 Australia :     L.J.J.      :
: Fax     : +61 2 6772 5376             :                 :
+---------------------------------------+-----------------+

In response to

Responses

pgsql-general by date

Next:From: Kris JurkaDate: 2004-03-01 01:21:24
Subject: Re: count(1) return 0?
Previous:From: Stephen HowardDate: 2004-03-01 01:04:19
Subject: referring to computed values from the select list in the where and order clauses

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