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 -> How I can select where a date is null..

How I can select where a date is null..

From: Paola <paolaa_at_libero.it>
Date: Mon, 19 Apr 2004 10:43:34 GMT
Message-ID: <q3Ogc.134271$Kc3.4479349@twister2.libero.it>


Hi, my problem is the following:
I have different selection parameters for my query. So, the user can insert one or more of these selection fields.

I think that an example can explain you better. this is my table:

    TAB1 (

      field1 VARCHAR2(25) NULL,
      filed2  VARCHAR2(25) NULL,
    ...
     DATA1 NUMBER(7) NULL)

(field DATA1 is a date in JULIAN format)

field1 field2 data1


A            A        2450341
B            BB

My query, supposed that var1 = '%' and var2 = '%') is

SELECT field1    FROM "tab1"
   WHERE ( upper("tab1".field1") like :var1) AND
       ( upper("tab1"."field1") like :var2) AND
       ...
       ( "tab1"."DATA_1" >=

TO_NUMBER(to_char(TO_DATE(:var_data,'DD/MM/YYYY'),'J')))

This SELECT has no result because DATA1 in the second record is null. How can resolve this problem?

Thank in advance!
Paola Received on Mon Apr 19 2004 - 05:43:34 CDT

Original text of this message

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