From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: what's wrong with my date comparison?
Date: Tue, 16 Oct 2007 14:04:55 -0400
Message-ID: <20071016180455.GQ3255@crankycanuck.ca> (raw)
In-Reply-To: <FE44E0D7EAD2ED4BB2165071DB8E328C03062CEA@egcrc-ex01.egcrc.org>
References: <FE44E0D7EAD2ED4BB2165071DB8E328C03062CEA@egcrc-ex01.egcrc.org>
On Tue, Oct 16, 2007 at 10:57:03AM -0700, Tena Sakai wrote:
> select name, value, datecreated
> from mytable
> where datecreated > 2007-10-02;
^^^^^^^^^^
2007-10-02 is an arithmetic expression equivalent to 1995.
I think what you want is
WHERE datecreated > '2007-10-02';
Note the quotes.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism.
--Brad Holland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ajs@crankycanuck.ca
Subject: Re: what's wrong with my date comparison?
In-Reply-To: <20071016180455.GQ3255@crankycanuck.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox