Re: substring .. - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: substring ..
Date
Msg-id Pine.BSF.4.21.0012191205580.77350-100000@megazone23.bigpanda.com
Whole thread Raw
In response to substring ..  (Jeff MacDonald <jeff@hub.org>)
List pgsql-sql
On Tue, 19 Dec 2000, Jeff MacDonald wrote:

> hi folks..
> 
> i want to do this to a datetime field..
> 
> select foo from table where substr(datefoo,1,11) = '2000-12-14';
> 
> it returns no results yet..
> 
> select substr(datefoo,1,11) does return some values that say
> 2000-12-14
> 
> any clues ?

My guess is that it's a trailing space thing.  '2000-12-14' is
only 10 characters not 11...  What you're actually getting is
probably '2000-12-14 '




pgsql-sql by date:

Previous
From: "Francis Solomon"
Date:
Subject: RE: substring ..
Next
From: Josh Berkus
Date:
Subject: Re: substring ..