Using SQL2000. According to Books Online, the avg aggregrate function
ignores null values. ((3+3+3+3+Null)/5) predictably returns Null. Is
there a function to ignore the Null entry, adjust the divisor, and
return a value of 3? For example:((3+3+3 +3)/4) after ignoring Null
entry.
If there's more than one null value, then adjust divisor accordingly.
For example: ((5+5+5+4+Null+ 5+5+Null)/8) would be ((5+5+5+4+5+5)/6)
after nulls ignored.
Thanks for any help or advice.
ignores null values. ((3+3+3+3+Null)/5) predictably returns Null. Is
there a function to ignore the Null entry, adjust the divisor, and
return a value of 3? For example:((3+3+3 +3)/4) after ignoring Null
entry.
If there's more than one null value, then adjust divisor accordingly.
For example: ((5+5+5+4+Null+ 5+5+Null)/8) would be ((5+5+5+4+5+5)/6)
after nulls ignored.
Thanks for any help or advice.
Comment