Re: what's wrong with my date comparison? - Mailing list pgsql-sql

From Tena Sakai
Subject Re: what's wrong with my date comparison?
Date
Msg-id FE44E0D7EAD2ED4BB2165071DB8E328C03062CEB@egcrc-ex01.egcrc.org
Whole thread Raw
In response to what's wrong with my date comparison?  ("Tena Sakai" <tsakai@gallo.ucsf.edu>)
Responses Re: what's wrong with my date comparison?
List pgsql-sql
<p><font size="2">Oooops!  I got it.<br /> I was missing quotes.<br /> It must have evaluated 2007-10-02 and used it as
a<br/> numerical constant 1995.<br /><br /> Sorry about commotion.<br /><br /> Tena<br /><br /><br /> -----Original
Message-----<br/> From: pgsql-sql-owner@postgresql.org on behalf of Tena Sakai<br /> Sent: Tue 10/16/2007 10:57 AM<br
/>To: pgsql-sql@postgresql.org<br /> Subject: [SQL] what's wrong with my date comparison?<br /><br /> Hi Everybody,<br
/><br/> I have a table with a column of timestamp type.  It is<br /> known to postgres like this:<br /><br />
 name           | character varying           | not null<br />  value           | character varying           | not
null<br/>  datecreated     | timestamp without time zone | not null<br /><br /> when I do query<br /><br />  select
name,value, datecreated<br />    from mytable<br />   where datecreated > 2007-10-02;<br /><br /> it reports:<br
/><br/>    name   |        value         |       datecreated      <br />
----------+----------------------+-------------------------<br/>  al_qual  | 0                    | 2007-08-09
00:06:06.742<br/>  srehquan | 3                    | 2007-08-09 00:06:06.742<br />  complete | 1                    |
2007-08-0900:06:06.743<br />  al_quan  | 0.315924933          | 2007-08-09 00:06:06.742<br />  bsa_qual |
0                   | 2007-08-09 00:06:06.743<br />  bsl_qual | 2                    | 2007-08-09 00:06:06.743<br />
 sh_qual | 0                    | 2007-08-09 00:06:06.742<br />     .             .                    .           .<br
/>    .             .                    .           .<br /><br /> I don't understand why it thinks August is greater
than<br/> October.  Can someone please elucidate what is going on?<br /><br /> Regards,<br /><br /> Tena Sakai<br />
tsakai@gallo.ucsf.edu<br/><br /><br /></font> 

pgsql-sql by date:

Previous
From: "Tena Sakai"
Date:
Subject: what's wrong with my date comparison?
Next
From: Andrew Sullivan
Date:
Subject: Re: what's wrong with my date comparison?