2 Replies Latest reply on Apr 23, 2015 6:03 AM by Stu412

    Error trapping on ExecuteSQL

    Stu412

      Title

      Error trapping on ExecuteSQL

      Post

      Hi there

      Let's say I have a very simple SQL query which results in division by zero for a certain circumstance.  For 99% of the time, it's fine.  The code is a very simple (X-Y)/X to get a profit percentage.

      What's the best way to get rid of the resulting '?' when there's division by zero?

      Normally is SQL I'd use an ISNULL before the field name, but I cannot seem to get this to work in FM.

      Thanks