Re: Decimal Data Type, is rounding....ah!
From: Zach Wells (no_zwells_spam_at_ain1.com)
Date: 06/02/04
- Next message: Hugo Kornelis: "Re: Decimal Data Type, is rounding....ah!"
- Previous message: Partha Mandayam: "Re: Problem with restore"
- In reply to: mitchel: "Decimal Data Type, is rounding....ah!"
- Next in thread: Hugo Kornelis: "Re: Decimal Data Type, is rounding....ah!"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 02 Jun 2004 16:52:07 -0500
mitchel wrote:
> Hi,
>
> I am submitting the following number to my SQL table to a field with a
> Decimal Data Type:
>
> 1.5873015873
>
> But when I bring back the number via ASP or check it in Enterprise Manager
> it records: 2
>
> These are the settings for the field:
>
> Decimal
> Description: blank
> Default Value: (0)
> Precision: 12
> Scale: 0
> Identity: No
>
> Should I be using a different data type? I will be doing some averaging
> with these numbers later on so that it why I selected Decimal.
>
> Thanks!
>
> Mitch
>
>
>
Scale = number of decimal places to the right of the decimal, you have
it at 0. Check out decimal/numeric in books online for a more thorough
explanation.
Zach
- Next message: Hugo Kornelis: "Re: Decimal Data Type, is rounding....ah!"
- Previous message: Partha Mandayam: "Re: Problem with restore"
- In reply to: mitchel: "Decimal Data Type, is rounding....ah!"
- Next in thread: Hugo Kornelis: "Re: Decimal Data Type, is rounding....ah!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|