It works, but as Sergey pointed out, there is a large performance hit.
It's about 2 - 2.5X in my test comparing Evaluate("max(n1,n2)") to
IIF(n1>n2, n1, n2). :(
>EVAL had crossed my mind, but I didn't try it. I wonder what the performance impact would be. Thanks for your reply.
>
>>Wrap MAX() in evaluate() should work.
>>
>>
>>select round(evaluate("max(0, QtyFld)") * PriceFld, 2) as TotalPriceFld;
>> from invoice;
>> into cursor TestCursor
>>
>>But if you want a non-negative Qtyfld, iif(QtyFld>0,Qty,0) might be better.
>>