I am running a query:
select....
from....
WHERE COMPANY=2000 AND
LOCATION='CDJ01' AND ITEMLOC.ACTIVE_STATUS='A'  AND POVAGRMTLN.PROCURE_GROUP='SMAR' 
AND RTRIM(LTRIM(POVAGRMTLN.VEN_AGRMT_REF)) = 'COM1-21-LARROC NANCY'
 AND RTRIM(LTRIM(POVAGRMTLN.VENDOR))='21'
 
and in the next part of the where I got this error:ORA-01722 invalid number
 
AND RTRIM(LTRIM(POVAGRMTLN.VEN_AGRMT_REF)) = 'COM1-21-LARROC NANCY'
 
If I write 'COM-21-LARROC NANCY'  the error dissapear, I don't have any clue why this happen, I read about this error but the help don't seem to fit on this case.
The  POVAGRMTLN.VEN_AGRMT_REF field is char(30).
 
ORA-01722 invalid number

Cause: The attempted conversion of a character string to a number failed because the character string was not a valid numeric literal. Only numeric fields or character fields containing numeric data may be used in arithmetic functions or expressions. Only numeric fields may be added to or subtracted from dates.

Action: Check the character strings in the function or _expression_. Check that they contain only numbers, a sign, a decimal point, and the character "E" or "e" and retry the operation.

Reply via email to