I am getting -401 Error during bind operation which means operand used in comparison not compatible. How can I come to know which statement caused this error. There are many SQLs used in my prog. Is there any precompiler option which will list all the SQL statments with the line no so that i can trace the problematic one.
-401 THE OPERANDS OF AN ARITHMETIC OR COMPARISON OPERATION ARE NOT
Explanation: An arithmetic operation appearing within the SQL statement
contains a mixture of numeric and non-numeric operands, or the operands of
a comparison operation are not compatible.
One reason for this error is that a field procedure exists on one of the
columns. If one column of arithmetic or comparison operation is defined
with a field procedure, other columns in the operation must be defined
with the same field procedure.
System Action: The statement cannot be executed.
Programmer Response: Check the data types of all operands to ensure that
their data types are comparable and compatible with their usage in the
If all the operands of the SQL statement are correct, then, if a view is
being accessed, check the data types of all the operands in the view