SQLTeam.com | Weblogs | Forums

Real data type field causing issues with numbers 100000.17 making it 100000.2


#1

I have a sequence field, it has sequence number dot two digit year, in real data type field.

it was fine upto 99999.17 and then the next number onwards instead of 100000.17 it is automatically turning to 100000.2

sequence numbers are like these in my database:"

99995.17
99996.17
99997.17
99998.17
99999.17
100000.2 ---should be 100000.17
100001.2 ---should be 100001.17
100002.2 so on so forth happenning. why is it causing this issue, please kindly need helpful advise.

Even though i try to manually insert also it is changing to this .2 as decimal, anything to do 8 bytes?

i have sql server 2008 R2 64 bit. on windows 2008 R2 OS.

Thanks a lot for the helpful info.