Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How I can select where a date is null..

Re: How I can select where a date is null..

From: Paola <paolaa_at_libero.it>
Date: Tue, 20 Apr 2004 06:50:06 GMT
Message-ID: <yK3hc.12341$Qc.516059@twister1.libero.it>


"Daniel Morgan" <damorgan_at_x.washington.edu> ha scritto nel messaggio >
> SELECT ...
> FROM ...
> WHERE ...
> UNION ALL
> SELECT ...
> FROM ...
> WHERE ...
Hi Daniel! Thanks for your suggestion. I tried to applied it and now my query is the following:

SELECT count(*)

        FROM "TAB1"
     WHERE ( Upper("TAB1"."FIELD1") like '%' ) AND
          ( Upper("TAB1"."FIELD2") like '%' ) AND
             ............

UNION
SELECT count(*)

        FROM "TAB1"
 WHERE

         (("TAB1"."DATA1"  >=
TO_NUMBER(to_char(TO_DATE('01/01/1800','DD/MM/YYYY'),'J')) ) AND
         ("TAB1"."DATA1" <=
TO_NUMBER(to_char(TO_DATE('01/01/2900','DD/MM/YYYY'),'J'))))

Field Data1 in TAB1 contains a NULL value and the result of this UNION query is

COUNT(*)



0
4
2 row selected.

Now I must tried to exclude a result = 0. Bye
Paola Received on Tue Apr 20 2004 - 01:50:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US