Re: [GENERAL] date null

From: Ulf Mehlig <umehlig(at)uni-bremen(dot)de>
To: michel(at)michel(dot)enter(dot)it
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] date null
Date: 1998-10-26 08:58:52
Message-ID: 199810260858.JAA02279@uni-bremen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Morelli 'ZioBudda' Davide Michel wrote:

> Hi, how can control in a "select" if a date is not null? [...] I
> want to select only tuples in which notifica1 or notifica2 or
> notifica3 are not null.

did you try the following?

select *
from prestito
where notifica1 is not null or
notifica2 is not null or
notifica3 is not null

The type of the column shouldn't matter, should it? And watch out,
there is a difference between "something = 0"and "something is null"
with something beeing some numeric type (float, int etc.): The first
says that the value of "something" in that row is zero, the second,
that there isn't any value assigned to "something"in that row. With
value zero you can do calculations (some! ;-), with "null", you
can't.

Ulf

--
======================================================================
%%%%% Ulf Mehlig <ulf(dot)mehlig(at)uni-bremen(dot)de>
%%%%!%%% Projekt "MADAM" <umehlig(at)uni-bremen(dot)de>
%%%% %!% %%%% ----------------------------------------------------
---| %%% MADAM: MAngrove | Center for Tropical Marine
||--%!% Dynamics | Biology
|| And | Fahrenheitstrasse 1
_ /||\_/\_ Management |
/ / \ \ ~~~~~~~~~~~~~~~~~ | 28359 Bremen/Germany
~~~~~~~~~~~~~~~~~~~~

In response to

  • date null at 1998-10-23 12:47:04 from ZioBudda

Browse pgsql-general by date

  From Date Subject
Next Message Dan Delaney 1998-10-26 16:09:05 Getting input from email...
Previous Message Ulf Mehlig 1998-10-26 08:47:02 Re: [GENERAL] select and join