Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01722 - "invalid number" when replacing from an item

Christian PitetJun 21 2016 — edited Jun 22 2016

hi

I have a select statement which return an error ORA-01722 -  "invalid number" *Cause:    The specified number was invalid.

The value of the item P6_TAXOIS is : 2895:4198:4179

select NULL LINK,

    (select ZONE_ from IF_2011_ZONES@SIGESRI_FAUNE where NUMZONE = IFF_OBSERVATION.ZONE) ZONES,

    count(*) as "Oiseaux"

from TAXREF, IFF_OBSERVATION

where IFF_OBSERVATION.CD_NOM=TAXREF.CD_NOM

AND   CLASSE = 'Aves'

AND TAXREF.CD_NOM IN ( REPLACE (:P6_TAXOIS, ':',',') )

group by TAXREF.CLASSE, IFF_OBSERVATION.ZONE

order by ZONES

If I perform this statement :

select REPLACE (:P6_TAXOIS, ':',',' )  from dual;

I get this result : 2895,4198,4179 which seems numbers with appropriate format.

I do not understand why I get this error.

Thank you for your kind help.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2016
Added on Jun 21 2016
12 comments
3,887 views