Re: More on unique vs distinct

From: Rodrigo Gonzalez <rjgonzale(at)gmail(dot)com>
To: stafford(at)marine(dot)rutgers(dot)edu
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: More on unique vs distinct
Date: 2006-11-20 22:46:21
Message-ID: 4562303D.4020300@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Not 100% sure....

select count(*) from (select distinct source_id from obis_sources) t

Wm.A.Stafford wrote:
> I guess I should have been a bit more specific. Here is an example of
> the type of query I'm finding in the Oracle app and the results of my
> attempt to find a PostgreSQL equivalent.
>
> select count(unique 'source_id') from obis_sources;
> pgAdmin III query responds:
> ERROR: syntax error at or near "'source_id'" at character 23
>
> select count(distinct 'source_id') from obis_sources;
> pgAdmin III query responds:
> ERROR: could not identify an equality operator for type "unknown"
>
> Thanks for all the help,
> -=bill
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Casey Duncan 2006-11-20 22:58:23 Re: More on unique vs distinct
Previous Message Jeff Davis 2006-11-20 22:07:57 Re: PostgreSQL equivalent of the Oracale 'unique'