RE: COUNT DISTINCT

From: "Eric Jain" <jain(at)gmx(dot)net>
To: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: RE: COUNT DISTINCT
Date: 2000-07-17 06:11:31
Message-ID: NCBBJFHBEGOIAHBCBNCLAEFHCJAA.jain@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Depending on what you want, you might be able to just get away with
> using coalesce on each of them...
>
> select count (distinct ( coalesce(text(advert_no), 'NULL') ||
> coalesce(text(pool_id), 'NULL' ) ) ) from redirect;

Great... This works perfectly. A bit of a monster though :-)

--
Eric Jain

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jurgen Defurne 2000-07-17 07:29:09 Re: Parallel databases?
Previous Message jprem 2000-07-17 05:56:01 cursor/ array in a function