On Thu, Oct 18, 2012 at 2:32 AM, John Beynon wrote:
> I just managed to solve the problem infact.
>
> The trailing 'e' character on the name was different for one row. All
> my tools, (pgadmin and the source data in openoffice) showed the same
> 'e' character but psql showed it as different charac
ctober 17, 2012 6:48 AM
>> To: pgsql-general@postgresql.org
>> Subject: [GENERAL] problem with distinct not distincting...
>>
>> I have a pretty basic query;
>>
>> select distinct on (name) name, length(name) from drugs where
>> customer_id IS NOT NULL o
On Wed, Oct 17, 2012 at 5:48 AM, John Beynon wrote:
> I have a pretty basic query;
>
> select distinct on (name) name, length(name) from
> drugs
> where customer_id IS NOT NULL
> order by name;
>
> which I'd expect to only return me a single drug name if there are
> duplicates, yet I get
>
> name
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of John Beynon
> Sent: Wednesday, October 17, 2012 6:48 AM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] problem with distinct not distinctin
John Beynon writes:
> I have a pretty basic query;
> select distinct on (name) name, length(name) from
> drugs
> where customer_id IS NOT NULL
> order by name;
> which I'd expect to only return me a single drug name if there are
> duplicates, yet I get
> name | length
> ==
> Roaccutane |
; pgsql-general@postgresql.org
Subject: Re: [GENERAL] problem with distinct not distincting...
Are you sure that one of those entries doesn't have a trailing space?
Susan
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Beha
bject: [GENERAL] problem with distinct not distincting...
I have a pretty basic query;
select distinct on (name) name, length(name) from drugs where customer_id IS
NOT NULL order by name;
which I'd expect to only return me a single drug name if there are duplicates,
yet I get
nam
I have a pretty basic query;
select distinct on (name) name, length(name) from
drugs
where customer_id IS NOT NULL
order by name;
which I'd expect to only return me a single drug name if there are
duplicates, yet I get
name | length
==
Roaccutane | 10
Roaccutane | 10
table encoding is U