Advantage Error Guide
Problem: A cursor column reference in an expression is not valid. The column name may not be valid or the data type of the column may not be valid for the expression.
Solution: Check the error message for the location of the error in the script. Check that the column is in the cursor. If the cursor is opened and closed with a different cursor definition, the column name must correspond to a column in the cursor that is currently open.