Don't you just want to FORMAT the data when you display it? How it is
stored in the database doesn't really matter does it? If the value was
23.31, it would be stored that way, so you are not risking an integrity
issue. You could use a format function to set it to as many decimals as
you like.
Follow up.
You are absolutely correct. With scale set to 2 the dec. works as described
the float would require manipulation that would be unnecessary. I will
change my DB also.
on 5/24/02 10:51 AM, Eric Weidl at [EMAIL PROTECTED] wrote:
> Hi,
>
>> I beg to differ at least with SQL 2000
>
> Yo
Interesting. I use float and in my taf results I get 3.5 when they enter 3.5
Maybe if they entered 3.50 I would get a different result and I did not
notice it because it is not money but increments of hours they use.
UI was going by the data displayed in the enterprise manager for my results
not
Hi,
>I beg to differ at least with SQL 2000
You can beg all you want, but FLOAT is the wrong data type to use. ;-)
If you don't believe me, believe Microsoft. Read the SQL Server Documentation:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_con_03_6mht.asp
>I ju
I beg to differ at least with SQL 2000
I just ran a test
Data Type Entered Result
Money 20.30 20.3
Decimal -prec2 20.30 2
Decimal - prec 4 20.30 2
Float20.30 20.30
USE FLOAT!!!
on 5/24/02 8:42 AM, Eric Weidl at [EM
Hi,
>Had this same one myself this week. Float is what you want.
No!
Float is an approximate data type. From the SQL Server docs:
"Approximate numeric (floating-point) data consists of data that is
preserved as accurately as the binary numbering system can offer."
That is, a number like 3.5
Had this same one myself this week. Float is what you want.
Dan
on 5/24/02 7:23 AM, Jason Pamental at [EMAIL PROTECTED] wrote:
> Brad,
>
> Either money¹ or decimal¹ should work as long as the decimal type is set
> for precision of 2. Check your db to make sure that the values are correct
>
Brad,
Either money¹ or decimal¹ should work as long as the decimal type is set
for precision of 2. Check your db to make sure that the values are correct
by using the Enterprise manager to look directly at the table data... I¹ve
had a number of frustrating experiences not realizing that it is
Anybody know a SQL Server 7 DataType that will hold a
number like 23.30 and not 23.3? I tried all kinds of variations of money,
smallmoney, numeric, and decimal.