Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Data type to store longest positive number

former_member182041
Active Contributor
0 Kudos

Hi Experts,

Requirement is: A number, lets say count, gets updated based on a certain criteria.

count = count + 1.

This happens at regular intervals.

I have to store this updated value in a table.

What should be the datatype for this field.

There is no restriction on the count. It can be ever increasing.

Kindly acknowledge.

With Regards,

Kumud

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

There is no datatype able to contain an infinite integer so there is strictly no absolute answer to your question.

...

Nevertheless you could use a NUMC field, which length can reach 255 characters. (a century lasts only 3.155.760.000 s, so even if your counter is incremented every ms, you have the time to leave...

INT4 could be a little two short (max 2.147.483.647, but you could start at -2.147.483.647)

Regards,

Raymond

2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos

There is no datatype able to contain an infinite integer so there is strictly no absolute answer to your question.

...

Nevertheless you could use a NUMC field, which length can reach 255 characters. (a century lasts only 3.155.760.000 s, so even if your counter is incremented every ms, you have the time to leave...

INT4 could be a little two short (max 2.147.483.647, but you could start at -2.147.483.647)

Regards,

Raymond

Former Member
0 Kudos

Hi,

try this way..

Create Domain with data type 'NUMC' and Number of Charatcers as '50'.

then There is no restriction on the count. It can be ever increasing upto to 100 lenght.

Prabhudas