Hi,
Can anyone tell me how to convert string datatype to integer in cognos. I had used the below functions such as
To_Number(), cast(). But i am getting the below errror continuously.
UDA-SQL-0114 The cursor supplied to the operation "sqlOpenResult" is inactive.UDA-SQL-0107 A general exception has occurred during the operation "open result".ORA-01722: invalid number
Also i am mentioning the datatype in FM is characterlength16. I need to change this to number in report studio. Please advise. I tried by using above funcitons but still getting the error.
Thanks.
what kind of data values you have,please mention.
cast([Report Studio object],int)
are you using this syntax only
hi, Thanks for your response.
I have used like below:
cast([Subsdry Acct No], integer)
cast([Subsdry Acct No], number)
cast([Subsdry Acct No], numeric)
I tried like the above options but getting error.
I am cognos 10.2.1 version and backend is Oracle.
The datatype of [Subsdry Acct No] is characterlength16.
Thanks.
try to change different column with length of 4 or 5
I am getting ur point?
What to change?
try to change any different string column into integer
Can you tell us what the values in [Subsdry Acct No] look like? If they contain alphabetic characters you are not going to be able to cast them as numbers.
MF.
Give us a few examples of the numbers.
Also, try and find some empty/blank rows if there are any and see if it's a null or a space.
Thanks all for your response.
Especially MFGF you are correct.
The value of [Subsdry Acct No] contains combination of alphabets and numbers. So i am unable to convert that into number.
Eventhough it is so simple, It took more time to predict this issue. Thank you all of your responses. :)