Hello Kevin,

YES, there was already some discussion about this topic several times
(and a long time ago), and NO this is not a bug. 

SQL defines the uniqueness of that NULL value in that way.

That means:

  Its relationship to any other value is always unknown.

meaning any comparision returning false, even the '<>' with a value.

Read more in this posting:

  http://listserv.sap.com/pipermail/sapdb.general/2002-October/031622.html

Regards

Alexander Schr�der
SAP DB, SAP Labs Berlin 

> -----Original Message-----
> From: Kevin Wilson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 14, 2003 4:53 PM
> To: Sapdb General List (E-mail)
> Subject: [BUG?] SELECT STATEMENT ON COLUMN WITH NULLS
> 
> 
> I apologize if this has been reported already but here it is anyway.
> 
> 1) I have an ASCII column called STATUS that allows NULL.
> 2) There are 190k+ records with mixed values in this column.
> 3) Running the following query causes the column that has 
>       the value of NULL to be filtered out which results in 
>       a inaccurate count:
> 
>       select COUNT(*) from call 
>       where status != 'CLOSED'
> 
> 4) Running the following query allows the NULL values to be counted:
> 
>       select COUNT(*) from call 
>       where status != 'CLOSED' OR STATUS IS NULL      
> 
> This occurs in both the SQL Studio as well as the JDBC driver 
> and I will
> guess that the ODBC driver is affected as well.
> 
> [Sys Info]
> SAPDB v7.3.0.34 (ASCII) on SuSE v8.1
> 
> 
> Please advise if this was previously reported and I simply 
> missed it and
> need to update to .40 of the server.
> 
> Thanks,
> 
> Kevin
> 
> "Those who would give up essential liberty to purchase a 
> little temporary
> safety deserve neither liberty nor safety."
>      -Benjamin Franklin, 1759 
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
> 
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to