COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: rr.bi1212 on 07 Jul 2016 09:47:15 AM

Title: View Tabular Data
Post by: rr.bi1212 on 07 Jul 2016 09:47:15 AM
I am trying to run a query using view Tabular Data and I Get the below error.

  An error occurred while performing operation 'sqlPrepareWithOptions' status='-126'.

I have got couple of 1:n or o:n joins in my framework...Is it causing that error? or Do I have to do anything else in general?
Title: Re: View Tabular Data
Post by: hespora on 07 Jul 2016 10:14:23 AM
Hey,


I'd suggest checking detail filters in your query *meticulously*, see if any of the objects compared can be, or are null. A filter checking for "NULL = value" does not return true or false, but returns null instead, which is one of the common causes for this error.
Title: Re: View Tabular Data
Post by: rr.bi1212 on 07 Jul 2016 10:17:02 AM
So how Should I resolve it?
Title: Re: View Tabular Data
Post by: hespora on 08 Jul 2016 02:17:22 AM
You can use
coalesce([data item], ValueInsteadOfNull) = value
in your filters instead of just [data item] = value. However, like I said, you need to review your joins if any data items used in filters *can* be null, and if that is correct.
Title: Re: View Tabular Data
Post by: dougp on 08 Jul 2016 10:29:12 AM
That error can indicate a problem with a data item, a filter, a join, or some problem in the model.  Including the entire error message here may help others help you.