ORA-01722 Invalid Number Error

buzz

Member
I am trying to execute the following code in an oracle dataset.

select * from League where
Points in (:List)

The field points is a numeric value, therefore when I put the values, 21,25,45, for example, against the variable :List, an error is returned

ORA-01722 Invalid Number, does anyone know how I can work around this problem.

Regards

Barry
 
The problem here is that Oracle tries to convert the List variable to a single number, because it is a bind variable. If you change the List variable to a substitution variable, it will work just fine because now the SQL Text will be modified.

------------------
Marco Kalter
Allround Automations
 
Back
Top