Re: Q: Precision in SQL server 2000
- From: "G .Net" <nodamnspam@xxxxxxxxx>
- Date: Wed, 18 Oct 2006 18:28:07 +0100
Thanks xAvailx
It is a measure of temperatures and velocities. I only need 3-4 decimal
places.
G
"xAvailx" <bjzamora@xxxxxxxxxxx> wrote in message
news:1161185135.976065.80420@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
How do you use your script. <<
You can run in Query Analyzer. Make sure you try this on a test server
first....there is no undo in SQL (unless you wrap in transaction and
roll back).
If you tell us what you are trying to store, we may be able to point
whether the data type you are using is "correct".
HTH
G .Net wrote:
Hi xAvailx
Ah, yes I am using EM and I'm afraid I'm a newbie :(
How do you use your script. I'm afraid I'm lost.
"xAvailx" <bjzamora@xxxxxxxxxxx> wrote in message
news:1161114953.036317.276730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The problem is that within sql server 2000 I don't see how to change
n
i.e. it is fixed as 53. <<
I am assuming you are referring to Enterprise Manager. I would stay
away from EM, specially when making any changes to your table schema.
The following script shoud work:
Alter Table YourTable
Alter Column YourCol
float(n)
May want to make sure you really want a float to store whatever you are
storing as lucm pointed.
HTH
G .Net wrote:
Hi xAvailx
Thanks for the information.
What you say makes sense. The problem is that within sql server 2000 I
don't
see how to change n i.e. it is fixed as 53.
"xAvailx" <bjzamora@xxxxxxxxxxx> wrote in message
news:1161108071.235919.290120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Unless I am not understanding your question...the following is from
BOL:
float [ ( n ) ]
Is a floating point number data from - 1.79E + 308 through 1.79E +
308.
n is the number of bits used to store the mantissa of the float
number
in scientific notation and thus dictates the precision and storage
size. n must be a value
FROM 1 THROUGH 53. <<--LOOK HERE
n is Precision Storage size
1-24 7 digits 4 bytes
25-53 15 digits 8 bytes
HTH
G .Net wrote:
Hi
I'm hoping somebody can help me with the following problem:
I have a table which has several fields holding floats. These
floats
need
only be stored to 3-4 decimal places, however, as far as I can see,
the
floats in sql server 2000 have a precision of 53 - far too much
precision.
I'm using ado.net to download this table to a .net application and
because
there are several thousand rows, and the length of each field is
large,
it
is taking too long to download the entire table.
Does anybody have a solution as to how I can store these values to
the
3-4
decimal places and reduce the download time?
Thanks in advance
.
- Follow-Ups:
- Re: Q: Precision in SQL server 2000
- From: Mike C#
- Re: Q: Precision in SQL server 2000
- References:
- Q: Precision in SQL server 2000
- From: G .Net
- Re: Q: Precision in SQL server 2000
- From: xAvailx
- Re: Q: Precision in SQL server 2000
- From: G .Net
- Re: Q: Precision in SQL server 2000
- From: xAvailx
- Re: Q: Precision in SQL server 2000
- From: G .Net
- Re: Q: Precision in SQL server 2000
- From: xAvailx
- Q: Precision in SQL server 2000
- Prev by Date: SQL 2000 vs 2005 connection error
- Next by Date: Re: Design to speed up a query using primary key
- Previous by thread: Re: Q: Precision in SQL server 2000
- Next by thread: Re: Q: Precision in SQL server 2000
- Index(es):
Relevant Pages
|