COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Tseug on 10 May 2010 09:00:52 AM

Title: varchar to integer
Post by: Tseug on 10 May 2010 09:00:52 AM
Hello!  I have the following in a Query Calculation:

if ([Q9] > 0) then (1) else (0)

which gives me the following error:

UDA-SQL-0460 A general exception has occurred during local processing.
UDA-EE-0094 The operation "greater" is invalid for the following combination of data types: "varchar" and "integer"


I'm unable to find a way to change the value of [Q9] to an integer ([Q9] is pulled from a .csv file).  I'd appreciate any and all suggestions.

Thanks! ;)
Title: Re: varchar to integer
Post by: matsau on 10 May 2010 04:07:41 PM
hi,
you can probably use function cast([Q9], integer). just make sure that this function is supported.