Incorrect results or an error might occur with an SQL procedure query where the join criteria is based on values calculated using the INPUT function
You might receive incorrect results, a Read Access Violation, or a Segmentation Violation when you run an SQL procedure query under the following conditions:
The query joins multiple tables.
The join criteria includes a comparison of results through the use of the INPUT function (for example, input(b.var,3.) = input(a.var,3.) - input(c.var,3.)).
There is no workaround for this issue other than possibly rewriting your query.