Hi All!
Have a question that I cant get my head around the problem of storing significant digits with a value.
In C# you can define:
decimal d = 1.10M
When you print it and or use it, the 1.10 is stored in side. And not rounded like double (gives 1.1 ).
But storing the litle bastard is more tricky.
Storing as:
nvarchar(11) gives 1.10.
decimal(8,3) gives 1.100 as well as numeric().
So is there a nice way to store it in a proper way (Which is type safe.)??
Regards
Daniel
Have a question that I cant get my head around the problem of storing significant digits with a value.
In C# you can define:
decimal d = 1.10M
When you print it and or use it, the 1.10 is stored in side. And not rounded like double (gives 1.1 ).
But storing the litle bastard is more tricky.
Storing as:
nvarchar(11) gives 1.10.
decimal(8,3) gives 1.100 as well as numeric().
So is there a nice way to store it in a proper way (Which is type safe.)??
Regards
Daniel
Comment