Hello, I was tasked to lead the business intelligence rollout for my company. We just installed Cognos 10.2
I am having quite a bit of trouble getting the hang of the basics. I come from a MS SQL background in database development and business Intelligence.
So I just created a test project and package. I am now trying to create a test report and ran across some issues.
First, I need to perform a custom sort on the results of one of the fields. In Visual Studio you are able to use an expression for custom sorting. This is not the case for Cognos. I read that I am suppose to create a new calculation definition in Framework Manager.
I just wanted to validate, is this true?
Now I go to create calculation and in the expression try to use a very simple Case statement.
What is wrong with my syntax it gives me this error
QE-DEF-0260 Parsing error before or near position: 14 of: "select
here is the code used:
case when test.type_category.type_cat_desc = 'International
else when test.type_category.type_cat_desc = 'Emerging Markets
else when test.type_category.type_cat_desc = 'US Equity'
else when test.type_category.type_cat_desc = 'Currency'
else when test.type_category.type_cat_desc = 'International Developed Equity'
else when test.type_category.type_cat_desc = 'Alternative Strategy'
Basically I am assigning a value to try to create the desired sort
What is wrong with this syntax and am I even doing this in the right place? Are there better alternatives.
This topic has been locked.
3 replies Latest Post - 2013-02-28T16:13:05Z by SystemAdmin
Pinned topic Question - Cognos Rookie here
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-02-28T16:13:05Z at 2013-02-28T16:13:05Z by SystemAdmin
Re: Question - Cognos Rookie here2013-02-27T19:58:16Z in response to SystemAdminI tried using one END for the above syntax it didnt work
I tried using 6 ENDs and it did not work
The error message generated QE-DEF-0260 Parsing error before or near position: says that I am using a Cognos or SQL keyword that it does not like
but I keep looking at the code and I do not see what keyword I am using
Please this is really urgent
DanielWagemann 2700058MAJ411 PostsACCEPTED ANSWER
Re: Question - Cognos Rookie here2013-02-27T22:06:53Z in response to SystemAdminWhere are you trying to do this in FM. Are you manually editing the SQL window?
Double click on the Query Subject and find the add calcuatlion button, then within the constructs you should see the template for the case when...
You original syntax is correct minus the select statement. I just think you maybe doing this in the wrong place.