All Forums Database
teradatasandcat 5 posts Joined 07/10
02 Aug 2011
how to store the very big integer in Teradata

hi , we are facing a problem about how to store the very big integer in Teradata.
Decimal(38,0) is not enough , and DOULE/REAL is not so accurate.
My data would be like this '1234567891234567891234567891234567891234'
Any help on this ?

Adeel Chaudhry 773 posts Joined 04/08
03 Aug 2011

Hi,

For storing such a value, consider thinking if you really need it as numeric value .... meaning if you are going to use it in some calculations or not. In case you are not going to use it in such way .... you may store it as character value.

Otherwise, the major concern shouldn't be how to store it instead how to perform calculations on something not supported by DBMS. One way which I can think of is to store number by parts and devise a set of UDFs to perform calculations using structures in C data-type. But that will offcourse require effort, time and algorithms for doing such calculations.

HTH!

Regards, MAC

-- If you are stuck at something .... consider it an opportunity to think anew.

You must sign in to leave a comment.