Re: select distinct error ?

From: "Henrik Steffen" <steffen(at)city-map(dot)de>
To: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: "pg" <pgsql-general(at)postgresql(dot)org>
Subject: Re: select distinct error ?
Date: 2002-07-25 16:47:17
Message-ID: 037b01c233fa$f0a54a00$7100a8c0@topconcepts.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hello,

I did now:

select foo,count(foobar),length(foo) from bar where foobar like 'foobar%' group by foo;

foo | count | length
------------------------
090700 | 494 | 6
090701 | 6 | 6
090702 | 4 | 6
090700 | 237 | 6

AAAAAAAAAA!!!!!!

now I found it!!!! User-input error: someone entered O90700 instead of 090700
with an 'O' (big 'o') instead of '0' (zero).... going crazy here.....

excuse me for this stupid question....

Mit freundlichem Gruß

Henrik Steffen
Geschäftsführer

top concepts Internetmarketing GmbH
Am Steinkamp 7 - D-21684 Stade - Germany
--------------------------------------------------------
http://www.topconcepts.com Tel. +49 4141 991230
mail: steffen(at)topconcepts(dot)com Fax. +49 4141 991233
--------------------------------------------------------
24h-Support Hotline: +49 1908 34697 (EUR 1.86/Min,topc)
--------------------------------------------------------
System-Partner gesucht: http://www.franchise.city-map.de
--------------------------------------------------------
Handelsregister: AG Stade HRB 5811 - UstId: DE 213645563
--------------------------------------------------------

----- Original Message -----
From: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "Henrik Steffen" <steffen(at)city-map(dot)de>
Cc: "pg" <pgsql-general(at)postgresql(dot)org>; "Sönke Ruempler" <soenke(at)ruempler(dot)de>
Sent: Thursday, July 25, 2002 5:55 PM
Subject: Re: [GENERAL] select distinct error ?

> On Thu, 25 Jul 2002, Henrik Steffen wrote:
>
> > select distinct foo from bar where foobar like 'foobar%';
> >
> > gives:
> >
> > foo
> > --------
> > 090700
> > 090701
> > 090702
> > 090700
> > (4 rows)
> >
> > foo is character(6)
> >
> > How can this happen??
>
> Do you have a simple dataset that you can replicate this with
> that you can send a dump of (tables, data). Also, what version
> and what locale are you running with?
>
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message omid omoomi 2002-07-25 17:02:16 Re: Data Corruptions (How to delete a corrupted row?)
Previous Message frank_lupo 2002-07-25 16:42:00 problem temporary table