If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

how to convert string datatype to integer in cognos

Started by yogeswari, 03 Feb 2015 04:28:14 AM

Previous topic - Next topic

yogeswari

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.


mitali

what kind of data values you have,please mention.

cast([Report Studio object],int)

are you using this syntax only

yogeswari

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.

mitali

try to change different column with length of 4 or 5

yogeswari


mitali

try to change any different string column into integer

MFGF

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.
Meep!

Robl

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.


yogeswari

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. :)