COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognosun on 20 May 2016 03:45:57 AM

Title: Cast funtion - Local processing error
Post by: cognosun on 20 May 2016 03:45:57 AM
For a calculation, I need to convert null to integer.

I'm doing this using cast(null,integer), it worked fine before, but all of a sudden it's giving me warning that the query requires local processing.

Is there any workaround for the same, currently we are on default processing and we don't want to enable local processing.

Many thanks in advance.
Title: Re: Cast funtion - Local processing error
Post by: BigChris on 20 May 2016 04:09:04 AM
You could try using the coalesce function...
Title: Re: Cast funtion - Local processing error
Post by: cognosun on 20 May 2016 04:33:55 AM
Hi Chris,

Can you please help me with the equivalent coalesce syntax , for cast(null,integer)

Many thanks in advance.
Title: Re: Cast funtion - Local processing error
Post by: BigChris on 20 May 2016 05:31:06 AM
From memory, it's something like coalesce([YourField],0) ... that assumes that you want to put a zero in place of the NULL.
Title: Re: Cast funtion - Local processing error
Post by: Lynn on 20 May 2016 07:02:50 AM
Or else try whatever your database syntax is for the cast function. For example, on DB2 it would be:


cast ( null as integer )




Title: Re: Cast funtion - Local processing error
Post by: cognosun on 20 May 2016 10:11:24 AM
cast, coalesce, to_number.....nothing is working :-)