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
Float            20.30              20.30

USE FLOAT!!!


on 5/24/02 8:42 AM, Eric Weidl at [EMAIL PROTECTED] wrote:

> 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 might be stored as 3.49! It is very likely you
> will get rounding errors if you use Float.
> 
> You should be using Decimal. You probably need to change the precision on
> the column. If you want two digits after the decimal place, set the
> Precision attribute of the column to 2.
> 
> Eric
> 
> 
> 
> 
>> 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
>>> 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 fine
>> in the
>>> DB but not in my query statement. When Witango pulls the data, all it knows
>>> is that it�s a number, so it loses the trailing 0. You can solve this by
>>> either using the @PAD tag or by using a �format=� statement in your tag
>> that
>>> displays the values. There are some good examples in the early pages of the
>>> Meta Tag book/pdf. (can�t remember off the top of my head the exact syntax)
>>> 
>>> Hope this helps...
>>> 
>>> Jason
>>> 
>>> On 5/24/02 2:24 AM, "Brad Robertson" <[EMAIL PROTECTED]> wrote:
>>> 
>>>> 
>>>> 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.
>>>> 
>>> 
>> 
>> --
>> Dan Stein
>> Digital Software Solutions
>> 799 Evergreen Circle
>> Telford PA 18969
>> 215-799-0192
>> 610-256-2843
>> Fax 413-410-9682
>> FMP,Tango, EDI,SQL 7
>> [EMAIL PROTECTED]
>> www.dss-db.com
>> 
>> 
>> ________________________________________________________________________
>> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>>                 with unsubscribe witango-talk in the message body
> 
> 
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>               with unsubscribe witango-talk in the message body
> 

-- 
Dan Stein
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
215-799-0192
610-256-2843
Fax 413-410-9682
FMP,Tango, EDI,SQL 7
[EMAIL PROTECTED]
www.dss-db.com


________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to