Skip site navigation (1) Skip section navigation (2)

Re: substring ..

From: Tulio Oliveira <mestredosmagos(at)marilia(dot)com>
To: Jeff MacDonald <jeff(at)hub(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: substring ..
Date: 2000-12-19 20:13:09
Message-ID: 3A3FC155.9A4709EB@marilia.com (view raw or flat)
Thread:
Lists: pgsql-sql
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 ?
> 
> Jeff MacDonald,
> 
> -----------------------------------------------------
> PostgreSQL Inc          | Hub.Org Networking Services
> jeff(at)pgsql(dot)com          | jeff(at)hub(dot)org
> www.pgsql.com           | www.hub.org
> 1-902-542-0713          | 1-902-542-3657
> -----------------------------------------------------
> Facsimile : 1 902 542 5386
> IRC Nick  : bignose
> PGP Public Key : http://bignose.hub.org/public.txt



try remove the "-" from your WHERE clausule...

This signal appears only in SELECT results...
-- 
======================================================
AKACIA TECNOLOGIA
Desenvolvimento de sistemas para Internet
www.akacia.com.br

In response to

pgsql-sql by date

Next:From: Francis SolomonDate: 2000-12-19 20:14:00
Subject: RE: substring ..
Previous:From: Joel BurtonDate: 2000-12-19 20:08:14
Subject: Re: substring ..

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group