Re: Using SELECT WHERE

From: Christian Armeanu <chris(at)vote4ad(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Using SELECT WHERE
Date: 2004-04-20 22:06:50
Message-ID: 40859EFA.6070205@vote4ad.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hey Michal,

Well, modify your select statement formatting the implant date including
the time and you'll answer your question yourself ;-)
What I'm saying is that a date field also includes time information and
this is causing your results.

Cheers,
Chris

Michal Lijowski wrote:

>I made a database and I would like to select entries
>which have data not equal to the specified date.
>I have postgresql-7.3.4-11 on Red Hat Fedora Core 1.
>
>Here is the command
>
>RabStudies=> SELECT RabNo, ImplantDate, Comments FROM RabStudiesInfo
>where implantdate <> 0001-01-01;
>
>and I get
>
> rabno | implantdate | comments
>
> 307 | 2004-02-23 | No mimetic No target
> 309 | 2004-02-23 | No mimetic No target; Frame 12 study terminated
> 314 | 2004-02-27 | No mimetic No target
> 311 | 2004-02-27 | No mimetic No target
> 310 | 2004-02-26 | No mimetic No target No decoy
> 315 | 0001-01-01 | No Tumor
> 320 | 0001-01-01 | No Tumor
> 316 | 0001-01-01 | No Tumor
> 313 | 0001-01-01 | No Tumor
>
>Why entries with implandate are listed?
>It is the same when I use != instead of <>.
>
>Thanks,
>
>Michal
>
>
>
>
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message JP Beaudry 2004-04-21 15:16:57 RE: [NOVICE] Création de BD
Previous Message Ron St-Pierre 2004-04-20 21:58:10 Re: Using SELECT WHERE