From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Chris Ruprecht <chrup999(at)yahoo(dot)com> |
Cc: | psql <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Select question |
Date: | 2001-05-23 16:15:15 |
Message-ID: | Pine.BSF.4.21.0105230913050.67638-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
I'm not sure, but...
Does it work if you say cdate > '2001-05-18' ? (Possibly ::date too)
I'd guess your date value you're trying to put there is getting treated
as an integer expression.
On Wed, 23 May 2001, Chris Ruprecht wrote:
> Hi all,
>
> although not new to databases, I'm new to the wonderful world of PostGreSQl
> and SQL in general.
> Question:
>
> I do this query
> phone=# select * from phonelog where cdate > 2001-05-18 order by cdate limit
> 2 ;
>
> And I get theis result
>
> cdate | ctime | countrycode | success | carrier | duration |
> phonenumber | areacode | pseq
> ------------+-------+-------------+---------+---------+----------+----------
> ---+----------+------
> 2001-04-01 | 0 | 370 | 1 | 1 | 8 | "3703348"
> | "33" | 4005
> 2001-04-01 | 0 | 98 | 1 | 1 | 15 | "9871162"
> | "71" | 3889
>
>
> Although I specified that I want only dates > 5/18/2001, I get dates
> 4/1/2001. Clearly, I ask the system the wrong question. How do I ask this
> question the correct way?
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-05-23 16:18:30 | Re: Select question |
Previous Message | David Olbersen | 2001-05-23 15:37:06 | Re: index/join madness |