Re: Select gives the wrong results

From: Crystle Numan <crys(at)guidedvision(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Select gives the wrong results
Date: 2005-08-30 11:20:31
Message-ID: 1125400831.7298.170.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2005-08-29 at 23:42 +0200, Martijn van Oosterhout wrote:
> On Mon, Aug 29, 2005 at 04:48:49PM -0400, Crystle Numan wrote:
> > Dear all:
> >
> > I am fairly knowledgeable about PostgreSQL but this behaviour is
> > stumping me. Any help would be wonderful. If you think it is a bug, let
> > me now and I'll file one.
> >
> > (select values in DB (date stamps) between Jan 1, 2000 and Jan 1, 2005,
> > no results)
>
> <snip results>
>
> Looks to me like "value" is a string type, is this possible?
>
> ORDER BY value should make it more obvious.

I think you are correct, that because the field is a string the
comparison is not working as I expected. Unfortunately, the way we set
up the database, I can't change the type to int as other values in this
'value' field contain letters. I'll have to find another way to get the
proper comparison.

Thanks to all who replied!

Crystle
--
Crystle Numan, B.Sc., Web Developer
Guided Vision: the possibilities are endless
905.528.3095 http://guidedvision.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nigel Horne 2005-08-30 11:34:27 Cursor declaration
Previous Message tomtailor 2005-08-30 11:13:37 Re: Resore PG-Data from Files after crash