IBM Cognos 10 Platform > Upgrading to Cognos 10

Report error when migrated to 10.2.2 version

(1/2) > >>


We are currently migrating our environment from 10.1.1 to 10.2.2, new content store was also created for this migration (Oracle).

However we experienced an error while testing some of the migrated reports:

RQP-DEF-0177 An error occurred while performing operation 'sqlPrepareWithOptions' status='-126'. UDA-SQL-0460 A general exception has occurred during local processing. UDA-EE-0094 The operation "extract" is invalid for the following combination of data types: "character" and "integer"

The report was not modified at all and confirmed working in 10.1.1 version, as I try to isolate the issue I found out that the error is a result of a detail filter syntax related to this code:

to_date(?End Date?, 'YYYY-MM-DD HH24:MI:SS') + 1

It's a high risk to modify all reports using this kind of syntax and we know it is working well in 10.1.1 but how come not in 10.2.2 version.

Hoping that you can share your thoughts and advice on this issue of mine. Thank You!

Are you positive that's what was causing the issue? Did the report run after disabling that detail filter?

Cognos has gotten more strict in each release, and we saw a lot of this in the move from C8 to C10. Previously, it allowed developers to get away with "loose" or bad syntax. For example, it allowed you to say Date = ?myPrompt?, where the value of prompt was a string. After upgrading, many people experienced the same error message below, but for "date" and "character".

The message you're getting is very similar in that it seems you're comparing a character to an integer somewhere. Do you have a "EXTRACT(MONTH FROM DATE_COLUMN) + 1" syntax anywhere? This is what it looks like to me.

You'll have to fix this syntax for the upgrade.


Yes, The report is running after disabling the said detail filter (to_date(?End Date?, 'YYYY-MM-DD HH24:MI:SS') + 1).

The weird thing is that we don't have an extract function created in the report with this code:


Only extract(year,?End Date?) which is working correctly, I'm looking into a way to not modify the affected reports for this migration.

Kindly let me know if you have some ideas. Thank You!


--- Quote from: Universe1418 on 08 Sep 2016 12:31:55 am ---Yes, The report is running after disabling the said detail filter (to_date(?End Date?, 'YYYY-MM-DD HH24:MI:SS') + 1).

--- End quote ---

I would log a support ticket with Cognos in that case, as you don't have any "bad" syntax in this statement. You're adding an integer to a day, and you're doing it within Oracle. I tested it and can see it in 10.1.1 being sent within the database query and working correctly.

The error indicating you're comparing a character to an integer looks suspicious.

Out of curiosity, if you remove the "+ 1" from the filter, does it work? This would help confirm the issue.


by removing + 1 the issue still remains, it seems that the issue is related in the to_date function because after modifying the code to something like this it run:


to_date(?End Date?, 'YYYY-MM-DD HH24:MI:SS') + 1


_add_days(?End Date?, 1)

However modifying all reports is really risky to don in this point and I know it is working in 10.1.1 how come not in 10.2.2

I've raised a PMR in IBM but even them is having a hard time to give me solutions that does not require modifications in the report.


[0] Message Index

[#] Next page

Go to full version