If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Parsing Error for an expression

Started by akhattri, 18 Jul 2008 02:32:16 PM

Previous topic - Next topic

akhattri

Hello All,

In one of my reports, I am trying to select maximum Test score("Test Score" is a data item and a corresponding data item "Test code" exists for a particular test score) value when Test Code is ‘A05’  (as multiple values of scores having test code A05 is possible) and for all the others, select normal values.
I initially applied the approach of setting in the properties Max(Test score) for test score column, however, that selects maximum value of all the possible different Test Codes and not just specific to test code 'A05'.

I am trying another approach to solve this by creating a new Data Item and then applying the logic shown below. However, it is giving me a parsing error, which I am unable to figure out, why is happening. Can you provide some assistance in resolving this? ( I have checked the data types in Data store and both of them are varchar2, so probably it is not a data type compatibility issue).

blom0344

My first thought is whether the conditional logic would be able to cope with the possibility of an aggregate / non-aggregate. Perhaps this leads to a problem with compiling an SQL that satisfies both scenario's. (like needing a 'group by' for the aggregate)

Different approach:

Split the query into 2:

For the 'A05' testcode create query 'A05' using the max on test score.

For all other testcodes create query 'non-A05' using test score 'normal' values.

Create  a third query as a union of the first 2 and use this one as a base for your report objects.