Jump to content
We've recently updated our Privacy Statement, available here ×

Error:SQL problems:ORA-01722: invlid number


kannanmugundan

Recommended Posts

I am using iReport 3.7.2 and i  get the above error when I write my sql and retrieve fields.

my sql looks like

select * from rbapmst_tb where  APMST_DLR_NO = $P{dlrNo}

I have a parameter dlrNo,  but if i replace the parameter with actual value

select * from rbapmst_tb where  APMST_DLR_NO = 'S1100'

It is retrieving all fileds.

It is just a simple String type parameter and the data base column is also  oracle VARCHAR2

 

Please help me why the $P{dlrNo} in not able to get  the fields.

Is this some thing normal in iReport (Please excuse me, if it is already mentioned  as i am new to iReport)

 

Thanks

 

 

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

"
AND APMST_DLR_NO = $P{dlrNo}
AND DLORG_DLR_NO = $P{dlrNo}
"

are you sure APMST_DLR_NO and also DLORG_DLR_NO are varchar ?

have you tried

select * from rbapmst_tb where  DLORG_DLR_NO = 'S1100'

?

it seems to be a conversion error...
with string parameters don't use ''.

 

Link to comment
Share on other sites

Hi

 

yes  DLORG_DLR_NO  is varchar and if I just replace all parameter with actual value/sql   It does retrieve the fields

 

 

I know that I may be  doing some silly mistake, but unable to figure it out

thanks



Post Edited by kannanmugundan at 05/31/2010 16:28
Link to comment
Share on other sites

have you tried to define parameters with default values and then when prompt for parameter value use the "default value" button?

with this test you can try to verify if there is an issue passing basic string value.

when you define default values, use:

new String("S1100") without ''

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...