Is there a solution if there are multiple functions involved. For example:
select field1, sum(nullfield1/IIF(field2>0,nullfield2,nullfield3) as result from sometable group by 1
The problem is I need to run a select that has a formula for a weighted average, not the AVG() function. This requires a difficult expression with several other functions.
I also have the need for an expression in a select that divides two sum() calculations, with the second sum being multiplied by 1000 to get the units correct. I have a specialized divide() function that I wrote that works with nulls, /0 errors, but this still causes problems. Any ideas?
Sorry, i have not seen this until today.
This is a old VFP bug.
WorkAround, use NVL():
CREATE CURSOR myCursor ( f1 I)
APPEND BLANK
lcName = LTRIM(NULL)
SELECT m.lcName from myCursor
SELECT EVL(.F.,m.lcName) from myCursor
SELECT NVL(NULL,m.lcName) from myCursor
Fabio