where != and NULLs
Posted in 1996
Peculiar Circumstance in Version 7. Is this a bug? Do an agregate query select sum(column_1) from table_a where column_2 != 'value' If column_2 is NULL for some records, the sum of column_1 will be incorrect. To get the correct sum the query has to be written select sum(column_1) from table_a where column_2 != 'value' or column_2 is NULL Me thinks there is a logic problem here. If column_2 is NULL then column_2 != 'value' This is a big nuissance. ciao p ****************************************************************************** Peter Wages EDS Arlington, Virginia pmwages@cais.com Work: (703) 741-7436 Home: (202) 244-3511 Anywhere is walking distance, if you have the time ******************************************************************************