COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: kclark on 27 Oct 2010 03:23:33 PM

Title: Framework Manager convert error
Post by: kclark on 27 Oct 2010 03:23:33 PM
Does anyone no what this error is:

This query contains an error and can not be executed.
It is recommended that you view the query feedback on the "Query Information" tab.

An error occurred while performing operation 'sqlOpenResult' status ='-28'.  and so on.

Title: Re: Framework Manager convert error
Post by: cognostechie on 27 Oct 2010 04:38:43 PM
It could be for a no. of reasons but mostly this error comes up when you have a syntax error somewhere.
Title: Re: Framework Manager convert error
Post by: kclark on 27 Oct 2010 04:48:04 PM
yes, it's saying error converting data type varchar to numeric.

The said query item is cast from varchar to numeric in another query subject.  Then a query subject references the casted query item and it's having trouble converting...why, it's already converted...
Title: Re: Framework Manager convert error
Post by: cognostechie on 27 Oct 2010 06:51:59 PM
Check the data in the database..
Title: Re: Framework Manager convert error
Post by: kclark on 28 Oct 2010 09:05:11 AM
That's what I mean the data in the database varchar...
Here's the scenario:

1. A query item is added to a query subject from the database.  This item is varchar
2. Another query item is added to the same query subject.  This query item is the same field that was brought in the previous step BUT it is casted to an integer datatype.
3. Now when I reference the casted field in a different Query Subject it throws me this error.  Is this not allowed in Framework Manager?
Title: Re: Framework Manager convert error
Post by: Lynn on 28 Oct 2010 09:24:15 AM
Do you have any values in the varchar column that can't be converted to a number? Spaces, letters, etc. would be problematic. It is easy enough to query the database directly to see if this is the issue or not.

If it is a data problem, you might consider adding a check to ensure the varchar field is numeric and casting to number when it is or setting to 0 or null if it isn't.
Title: Re: Framework Manager convert error
Post by: kclark on 28 Oct 2010 01:05:44 PM
Hmmm...I will try that and let you know...thanks!