RE: [GENERAL] date null - Mailing list pgsql-general

From Taral
Subject RE: [GENERAL] date null
Date
Msg-id 000801bdfeae$90876980$3b291f0a@taral
Whole thread Raw
In response to date null  (ZioBudda <michel@michel.enter.it>)
List pgsql-general
use IS NOT NULL:

SELECT * from prestito WHERE notifica1 IS NOT NULL OR notifica2 IS NOT NULL
OR notifica3 IS NOT NULL;

I seem to remember that the equality/inequality operators don't work on NULL
right now...

Taral

> -----Original Message-----
> From: owner-pgsql-general@postgreSQL.org
> [mailto:owner-pgsql-general@postgreSQL.org]On Behalf Of ZioBudda
> Sent: Friday, October 23, 1998 7:47 AM
> To: pgsql-general@postgreSQL.org
> Subject: [GENERAL] date null
>
>
> Hi, how can control in a "select" if a date is not null?
> I have this table:
> Table    = prestito
> +----------------------------------+------------------------------
> ----+-------+
> |              Field               |              Type                |
> Length|
> +----------------------------------+------------------------------
> ----+-------+
> | id_libro                         | varchar() not null               |
> 10 |
> | id_utente                        | int4 not null                    |
> 4 |
> | data_prestito                    | date                             |
> 4 |
> | data_restituzione                | date                             |
> 4 |
> | n_gg_prestito                    | int4 not null                    |
> 4 |
> | notifica1                        | date                             |
> 4 |
> | notifica2                        | date                             |
> 4 |
> | notifica3                        | date                             |
> 4 |
> +----------------------------------+------------------------------
> ----+-------+
>
> and I want to select only tuples in which notifica1 or notifica2 or
> notifica3 are not null.
>
>
> "Il divertimento e' giusto se la scimmia ci prende gusto"
> --
> Pluto Linux Press: http://ziobudda.enter.it/PLP
> --
> Morelli 'ZioBudda' Davide Michel - Member of Pluto Linux User Group
> michel@enter.it - http://ziobudda.enter.it/
> Linux Problem? Ask to linux@media.dsi.unimi.it
> "/dev/ziobudda: access to /var/tmp/beer denied, use /var/adm/pineapple"
>
>


pgsql-general by date:

Previous
From: "Taral"
Date:
Subject: RE: [GENERAL] select and join
Next
From: Herouth Maoz
Date:
Subject: Re: [SQL] Reading and writing at the same time