Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Condition for generating NULL - response (4) by dnoeth

$
0
0

Hi Eliot,
ACOS will return NULL only for NULL as input value, but when the value is out of the valid range there should be a 5585 error.
So this seems to be a bug, the optimizer doesn't actually evaluate the expression, but assumes that it will return a value (which is NOT NULL).
The get a NULL you should check if the input value is within the allowed range, e.g.
CASE WHEN x BETWEEN -1 AND 1 THEN ACOS(x) END
 
Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>