Home » RDBMS Server » Server Administration » select doesn't return null values
select doesn't return null values [message #373963] Fri, 18 May 2001 04:10 Go to next message
Andrea Mainardi
Messages: 3
Registered: May 2001
Junior Member
hi everybody.
I have the following problem:

suppose to have a table containing the following values for a field 'field1':

ROW 1 --> a
ROW 2 --> b
ROW 3 --> (Null value)

if i execute this query
select field1 from table where field1 <> 'a' group by field1;

the result is

b

the rows with null values are not selected.

how can i select even the null values?
Note:
i can't modify the query using an = constraint!!
or asking for is null
Re: select doesn't return null values [message #373969 is a reply to message #373963] Fri, 18 May 2001 05:09 Go to previous messageGo to next message
GIRIDHAR KODAKALLA
Messages: 92
Registered: May 2001
Member
Hai,
Try this sql
select field1 from table where NVL(field1,’B’) <> 'a' ;
Cheers,
Giridhar Kodakalla
Re: select doesn't return null values [message #373972 is a reply to message #373963] Fri, 18 May 2001 05:13 Go to previous messageGo to next message
GIRIDHAR KODAKALLA
Messages: 92
Registered: May 2001
Member
Hai,
Try this sql
select field1 from table where NVL(field1,’B’) <> 'a' ;
Cheers,
Giridhar Kodakalla
Re: select doesn't return null values [message #373973 is a reply to message #373963] Fri, 18 May 2001 05:16 Go to previous messageGo to next message
GIRIDHAR KODAKALLA
Messages: 92
Registered: May 2001
Member
Hai,
Try this sql
select field1 from table where NVL(field1,’B’) <> 'a' ;
Cheers,
Giridhar Kodakalla
Re: select doesn't return null values [message #373974 is a reply to message #373963] Fri, 18 May 2001 05:19 Go to previous message
GIRIDHAR KODAKALLA
Messages: 92
Registered: May 2001
Member
Hai,
Try this sql
select field1 from table where NVL(field1,’B’) <> 'a' ;
Cheers,
Giridhar Kodakalla
Previous Topic: No
Next Topic: No
Goto Forum:
  


Current Time: Mon Jul 01 04:10:57 CDT 2024