I have seen this type of error when one of the databases is non-oracle, or it is Oracle but some other version. Is that the case ?
If so, there are a few things I would suggest to try:
– If the error is detected in the ‘where’ clause, you might need to be sure that no implicit type conversions are being made in the ‘where’ conditions (i.e. comparing numeric fields with varchar ones), or you may even need to force this type conversions (ex. t1.numeric_field1 = to_char(t2.numeric_field2)). This may sound a little strange (maybe not too little) but believe me, it could work.
– If the error is in the columns list of the ‘select’ statement, you could need to re-write your cursor using dynamic sql, enclosing your column names or even your table names in double quotes.
query_str := ‘SELECT “num”, “cust”, “amt” FROM inv_january WHERE invnum = :id';
OPEN c FOR query_str USING inv_num;
FETCH c INTO inv_num, inv_cust, inv_amt;
EXIT WHEN c%NOTFOUND;
— process row here
Good luck !!