Marc,
I'd start pulling it apart and see what is really causing it to fail. ie remove the expression entirely see if it's your join/where. Exclude the records where v_weight = 0... just throwing out standard degugging ideas here. If the join/where is the fault it might be corrupted index as has been elsewhere suggested.
>Or a division by .null. or something. No record has V_Weight= 0, I even tried without the iif() and it did not work. The UDF will have to wait until tomorrow.
>
>BTW I tried with isNull() but it did not give any result either.