Re: [GENERAL] date null

Поиск
Список
Период
Сортировка
От Ulf Mehlig
Тема Re: [GENERAL] date null
Дата
Msg-id 199810260858.JAA02279@uni-bremen.de
обсуждение исходный текст
Ответ на date null  (ZioBudda <michel@michel.enter.it>)
Список 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.mehlig@uni-bremen.de>
   %%%%!%%%       Projekt "MADAM"         <umehlig@uni-bremen.de>
%%%% %!% %%%%     ----------------------------------------------------
 ---| %%%         MADAM:  MAngrove    |  Center for Tropical Marine
    ||--%!%              Dynamics     |  Biology
    ||                  And           |  Fahrenheitstrasse 1
 _ /||\_/\_            Management     |
/  /    \  \ ~~~~~~~~~~~~~~~~~        |  28359 Bremen/Germany
  ~~~~~~~~~~~~~~~~~~~~

В списке pgsql-general по дате отправления:

Предыдущее
От: ulrich@strategic.co.za
Дата:
Сообщение: tm
Следующее
От: Ulf Mehlig
Дата:
Сообщение: Re: [GENERAL] select and join