COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognoshelp@ymail.com on 09 Nov 2008 07:20:24 PM

Title: y i'm getting this error??
Post by: cognoshelp@ymail.com on 09 Nov 2008 07:20:24 PM
I am getting this error some times and some times report runs normally. Please see attachment and help me....

Thanks
Title: Re: y i'm getting this error??
Post by: lindero on 10 Nov 2008 02:00:44 AM
seems to be a character in the parameter that you want to pass to the function to_number(). could this be? this was my feeling while reading the error message.

cheers
Title: Re: y i'm getting this error??
Post by: blom0344 on 10 Nov 2008 08:56:23 AM
Quote from: cognoshelp@ymail.com on 09 Nov 2008 07:20:24 PM
I am getting this error some times and some times report runs normally. Please see attachment and help me....

Thanks

Cognos claims that it supports native SQL expressions, but we stay away from them as much as we can. It simply is not robust enough (at least in version 8.1.2.) and we kept getting these type of error messages with for no apparent reason in existing reports..
Title: Re: y i'm getting this error??
Post by: Suraj on 10 Nov 2008 12:36:42 PM
Here's my from experience(could be diff. issue as well):
The reason could be that to_number is expecting numbers in other data types to convert to integer and is getting something other characters.
It runs sometimes fine because other filters/conditions in the where clause already filtered the data down so that it can do the conversion without any issue.
But the execution of where clause is not same at different runs.
It may execute first 3 clauses and skip over to last clause.
In that situation, the to_number function may be getting values that can not be converted to number.
Title: Re: y i'm getting this error??
Post by: blom0344 on 11 Nov 2008 11:28:46 AM
I beg to differ. The error message does not indicate that this is a datatype conversion problem. It indicates that Cognos can not interprete the native function at runtime (a sort of compilation error)
We have had these problems on a regular basis with the T-SQL 'Year' function.
New reports worked with it, but after some maintenance we received similar error messages as the one posted by CognosHelp.
The only remedy was changing the year function to the Cognos extract(year,date) construct. It is just not very well implemented by Cognos.
Title: Re: y i'm getting this error??
Post by: Suraj on 11 Nov 2008 12:16:41 PM
I see. I was giving an example of my experience.
That's why I said...
Quote
Here's my from experience(could be diff. issue as well):
:)