Execute Query: ERROR [22018] [Oracle][ODBC][Ora]ORA-01722: invalid number

Hi guys, how are u?

I’m having a problem with parameters in execute query activity.
I’m trying to execute this query i n an ODBC connection:

“Select cd_gru_fat, cd_pro_fat, sn_pertence_pacote From dbamv.itreg_amb
Where cd_atendimento = TO_NUMBER(‘?’)
order by cd_gru_fat, cd_pro_fat”

With a parameter like this:

Name , Direction , Type , Value
Atendimento , In , String , row.Item(“CD_ATENDIMENTO”).ToString.

but every time I try to execute this I get the following message:

Body: ERROR [22018] [Oracle][ODBC][Ora]ORA-01722: invalid number

I’ve tried t oexecute with a number inside and it executes perfectly
I have executed it in Oracle SQL developer with a number instead of the parameter and it worked too.

I don’t know whats wtong, can someone help me?

I could solve this by assigning a variable as int32

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.