I am trying to divide the value of one column ($in.0._2012_Buildings_Local_Ccy) by the value in another ($in.0.USD_ROE) but I am running into the “/ by zero” error message. The reason for the division is to translate non-USD values into their USD equivalents.
Although most of the “$in.0.USD_ROE” values are 1 (or greater than 1), some of the values in this column are less than 1 (e.g. 0.646, 0.7994) and I wonder whether that’s why I’m seeing the “/ by zero” message?
I’ve tried various approaches but none seem to fix the problem, for example:
$out.0.buildings_value = round(nvl($in.0._2012_Buildings_Local_Ccy,0/$in.0.USD_ROE));
$out.0.buildings_value = (nvl($in.0._2012_Buildings_Local_Ccy,0/$in.0.USD_ROE));
$out.0.buildings_value = round(nvl($in.0._2012_Buildings_Local_Ccy,0)/$in.0.USD_ROE);
$out.0.buildings_value = ($in.0._2012_Buildings_Local_Ccy/$in.0.USD_ROE); (in this case I get an “unexpected null value” message instead of the “/ by zero” message).
Both columns are defined as “long”.
Could someone please tell me the correct expression to divide by a number that’s greater than 0 but less than 1.
Thanks,
Loretta