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

BIGINT data size

Started by mp3909, 27 Jul 2021 05:13:26 AM

Previous topic - Next topic

mp3909

Hello,

What is the largest number the BIGINT data type is able to hold in Cognos report?

Thank You

dougp

I don't think data types are defined in Cognos.  Do you mean, "What is the largest number the BIGINT data type is able to hold in SQL Server?" or something similar?

https://docs.microsoft.com/en-us/sql/t-sql/data-types/int-bigint-smallint-and-tinyint-transact-sql?view=sql-server-ver15

mp3909

Hi,

In my cognos report, one of the data items has a cast function defined within its data expression.
The actual number/value that gets stored in that data item comes directly from the SQL Server database.
But when I tried to run the report, it was giving an error saying "overflow".
So I changed the cast from an INT to BIGINT for that particular data item and that did the trick.
So I guess you can define data types in Cognos report, no?

Thanks,

dougp

Quoteone of the data items has a cast function defined within its data expression
I don't understand.  Are you saying that there is a CAST built into the Framework Manager model?  Or are you saying that the data item expression in the report uses CAST?


QuoteThe actual number/value that gets stored in that data item
Cognos doesn't store data.  It reports data -- and hopefully the report design was thought out well enough that it's presenting information, not just data.


Quotecomes directly from the SQL Server database.
If the value comes directly from SQL Server, there is seldom a reason to use CAST.  What is the data type (in SQL Server)?  If it's a BIGINT, there is no reason to use CAST.  If it is INT, there should still be no reason to cast because there is no way a value stored as an INT in the database magically grows to something larger than an INT can handle without some external force being applied.
Are you sure you're not multiplying two numbers together or something?


Quoteit was giving an error saying "overflow"
I'm sure the error message was longer than "overflow".  Look at the details of the message to determine what actually went wrong.


Quoteyou can define data types in Cognos report
No.  You are not modifying the data.  But you can CAST the data to another type if that is what is needed to produce a valid join, concatenate a number to a string, or some other reporting need.