显示标签为“float”的博文。显示所有博文
显示标签为“float”的博文。显示所有博文

2012年3月29日星期四

Floating point precision

Hi, I have a SP which adds a bunch of the same number together 365
times
The base number is 0.0575342465753425
I am storing this as a float but when I view it in the first iteration
it appears as
0.0575342
The next one is
0.115068
and the 10th one is
0.575342
and finally the 365 one is
21.0575
However if I multiply the original number by 365 I get the following
21.0000000000000125
Which is vastly different from the one I got using a float.
How can I get more precision using MSSQL float? Am I using the wrong
Datatype'
TIA
Mark
================================= 2006MJGOOGLENEWSDon't use FLOAT it is not accurate in terms of precision
What you get if you use DECIMAL datatype intead?
<MarkusJNZ@.gmail.com> wrote in message
news:1159441537.669380.150810@.b28g2000cwb.googlegroups.com...
> Hi, I have a SP which adds a bunch of the same number together 365
> times
> The base number is 0.0575342465753425
> I am storing this as a float but when I view it in the first iteration
> it appears as
> 0.0575342
> The next one is
> 0.115068
> and the 10th one is
> 0.575342
> and finally the 365 one is
> 21.0575
> However if I multiply the original number by 365 I get the following
> 21.0000000000000125
> Which is vastly different from the one I got using a float.
> How can I get more precision using MSSQL float? Am I using the wrong
> Datatype'
> TIA
> Mark
> =================================> 2006MJGOOGLENEWS
>|||MarkusJNZ@.gmail.com wrote:
> Hi, I have a SP which adds a bunch of the same number together 365
> times
> The base number is 0.0575342465753425
> I am storing this as a float but when I view it in the first iteration
> it appears as
> 0.0575342
> The next one is
> 0.115068
> and the 10th one is
> 0.575342
> and finally the 365 one is
> 21.0575
> However if I multiply the original number by 365 I get the following
> 21.0000000000000125
> Which is vastly different from the one I got using a float.
> How can I get more precision using MSSQL float? Am I using the wrong
> Datatype'
> TIA
> Mark
> =================================> 2006MJGOOGLENEWS
>
From Books Online:
"Floating point data is approximate; not all values in the data type
range can be precisely represented."
Float is not a precise data type, use DECIMAL or one of the other
numeric types instead...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||On 28 Sep 2006 04:05:37 -0700, MarkusJNZ@.gmail.com wrote:
>Hi, I have a SP which adds a bunch of the same number together 365
>times
>The base number is 0.0575342465753425
>I am storing this as a float but when I view it in the first iteration
>it appears as
>0.0575342
>The next one is
>0.115068
>and the 10th one is
>0.575342
>and finally the 365 one is
>21.0575
>However if I multiply the original number by 365 I get the following
>21.0000000000000125
>Which is vastly different from the one I got using a float.
>How can I get more precision using MSSQL float? Am I using the wrong
>Datatype'
Hi Mark,
Nothing wrong with the datatype - the pproblem is in the code. Since the
result is off by 0.0575, which is exactly the number you start with, I'd
double-check the code - you're probably adding the same number 366 times
instead of 365 times.
Here's some code I used (note the CAST near the end to force display of
numbers to the far right of the decimal point):
declare @.flt float, @.res float, @.i int
set @.flt = 0.0575342465753425
set @.res = 0
set @.i = 0
while @.i < 365
begin
set @.i = @.i + 1
set @.res = @.res + @.flt
end
select cast(@.res as decimal(38,30))
select cast(@.flt * 365.0 as decimal(38,30))
Results:
---
21.000000000000046000000000000000
---
21.000000000000014000000000000000
As you see, there is SOME loss of precision, but not quites as much as
you had.
Incidentally, if you change the datatypes of @.flt and @.res in the code
above to decimal(38,10), the results change to
---
21.000000000000012500000000000000
---
21.000000000000012500000000000000
Hugo Kornelis, SQL Server MVP|||Thanks everyone for your help.
Hug, you were right, I was adding it 1 more than I needed to; late
night programming lol
Thanks
Mark
Hugo Kornelis wrote:
> On 28 Sep 2006 04:05:37 -0700, MarkusJNZ@.gmail.com wrote:
> >Hi, I have a SP which adds a bunch of the same number together 365
> >times
> >
> >The base number is 0.0575342465753425
> >
> >I am storing this as a float but when I view it in the first iteration
> >it appears as
> >
> >0.0575342
> >
> >The next one is
> >
> >0.115068
> >
> >and the 10th one is
> >
> >0.575342
> >
> >and finally the 365 one is
> >
> >21.0575
> >
> >However if I multiply the original number by 365 I get the following
> >21.0000000000000125
> >
> >Which is vastly different from the one I got using a float.
> >
> >How can I get more precision using MSSQL float? Am I using the wrong
> >Datatype'
> Hi Mark,
> Nothing wrong with the datatype - the pproblem is in the code. Since the
> result is off by 0.0575, which is exactly the number you start with, I'd
> double-check the code - you're probably adding the same number 366 times
> instead of 365 times.
> Here's some code I used (note the CAST near the end to force display of
> numbers to the far right of the decimal point):
> declare @.flt float, @.res float, @.i int
> set @.flt = 0.0575342465753425
> set @.res = 0
> set @.i = 0
> while @.i < 365
> begin
> set @.i = @.i + 1
> set @.res = @.res + @.flt
> end
> select cast(@.res as decimal(38,30))
> select cast(@.flt * 365.0 as decimal(38,30))
> Results:
>
> ---
> 21.000000000000046000000000000000
>
> ---
> 21.000000000000014000000000000000
> As you see, there is SOME loss of precision, but not quites as much as
> you had.
> Incidentally, if you change the datatypes of @.flt and @.res in the code
> above to decimal(38,10), the results change to
>
> ---
> 21.000000000000012500000000000000
>
> ---
> 21.000000000000012500000000000000
>
> --
> Hugo Kornelis, SQL Server MVPsql

Floating point precision

Hi, I have a SP which adds a bunch of the same number together 365
times
The base number is 0.0575342465753425
I am storing this as a float but when I view it in the first iteration
it appears as
0.0575342
The next one is
0.115068
and the 10th one is
0.575342
and finally the 365 one is
21.0575
However if I multiply the original number by 365 I get the following
21.0000000000000125
Which is vastly different from the one I got using a float.
How can I get more precision using MSSQL float? Am I using the wrong
Datatype?
TIA
Mark
=================================
2006MJGOOGLENEWS
Don't use FLOAT it is not accurate in terms of precision
What you get if you use DECIMAL datatype intead?
<MarkusJNZ@.gmail.com> wrote in message
news:1159441537.669380.150810@.b28g2000cwb.googlegr oups.com...
> Hi, I have a SP which adds a bunch of the same number together 365
> times
> The base number is 0.0575342465753425
> I am storing this as a float but when I view it in the first iteration
> it appears as
> 0.0575342
> The next one is
> 0.115068
> and the 10th one is
> 0.575342
> and finally the 365 one is
> 21.0575
> However if I multiply the original number by 365 I get the following
> 21.0000000000000125
> Which is vastly different from the one I got using a float.
> How can I get more precision using MSSQL float? Am I using the wrong
> Datatype?
> TIA
> Mark
> =================================
> 2006MJGOOGLENEWS
>
|||MarkusJNZ@.gmail.com wrote:
> Hi, I have a SP which adds a bunch of the same number together 365
> times
> The base number is 0.0575342465753425
> I am storing this as a float but when I view it in the first iteration
> it appears as
> 0.0575342
> The next one is
> 0.115068
> and the 10th one is
> 0.575342
> and finally the 365 one is
> 21.0575
> However if I multiply the original number by 365 I get the following
> 21.0000000000000125
> Which is vastly different from the one I got using a float.
> How can I get more precision using MSSQL float? Am I using the wrong
> Datatype?
> TIA
> Mark
> =================================
> 2006MJGOOGLENEWS
>
From Books Online:
"Floating point data is approximate; not all values in the data type
range can be precisely represented."
Float is not a precise data type, use DECIMAL or one of the other
numeric types instead...
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||On 28 Sep 2006 04:05:37 -0700, MarkusJNZ@.gmail.com wrote:

>Hi, I have a SP which adds a bunch of the same number together 365
>times
>The base number is 0.0575342465753425
>I am storing this as a float but when I view it in the first iteration
>it appears as
>0.0575342
>The next one is
>0.115068
>and the 10th one is
>0.575342
>and finally the 365 one is
>21.0575
>However if I multiply the original number by 365 I get the following
>21.0000000000000125
>Which is vastly different from the one I got using a float.
>How can I get more precision using MSSQL float? Am I using the wrong
>Datatype?
Hi Mark,
Nothing wrong with the datatype - the pproblem is in the code. Since the
result is off by 0.0575, which is exactly the number you start with, I'd
double-check the code - you're probably adding the same number 366 times
instead of 365 times.
Here's some code I used (note the CAST near the end to force display of
numbers to the far right of the decimal point):
declare @.flt float, @.res float, @.i int
set @.flt = 0.0575342465753425
set @.res = 0
set @.i = 0
while @.i < 365
begin
set @.i = @.i + 1
set @.res = @.res + @.flt
end
select cast(@.res as decimal(38,30))
select cast(@.flt * 365.0 as decimal(38,30))
Results:
21.000000000000046000000000000000
21.000000000000014000000000000000
As you see, there is SOME loss of precision, but not quites as much as
you had.
Incidentally, if you change the datatypes of @.flt and @.res in the code
above to decimal(38,10), the results change to
21.000000000000012500000000000000
21.000000000000012500000000000000
Hugo Kornelis, SQL Server MVP
|||Thanks everyone for your help.
Hug, you were right, I was adding it 1 more than I needed to; late
night programming lol
Thanks
Mark
Hugo Kornelis wrote:
> On 28 Sep 2006 04:05:37 -0700, MarkusJNZ@.gmail.com wrote:
>
> Hi Mark,
> Nothing wrong with the datatype - the pproblem is in the code. Since the
> result is off by 0.0575, which is exactly the number you start with, I'd
> double-check the code - you're probably adding the same number 366 times
> instead of 365 times.
> Here's some code I used (note the CAST near the end to force display of
> numbers to the far right of the decimal point):
> declare @.flt float, @.res float, @.i int
> set @.flt = 0.0575342465753425
> set @.res = 0
> set @.i = 0
> while @.i < 365
> begin
> set @.i = @.i + 1
> set @.res = @.res + @.flt
> end
> select cast(@.res as decimal(38,30))
> select cast(@.flt * 365.0 as decimal(38,30))
> Results:
>
> 21.000000000000046000000000000000
>
> 21.000000000000014000000000000000
> As you see, there is SOME loss of precision, but not quites as much as
> you had.
> Incidentally, if you change the datatypes of @.flt and @.res in the code
> above to decimal(38,10), the results change to
>
> 21.000000000000012500000000000000
>
> 21.000000000000012500000000000000
>
> --
> Hugo Kornelis, SQL Server MVP

Floating point precision

Hi, I have a SP which adds a bunch of the same number together 365
times
The base number is 0.0575342465753425
I am storing this as a float but when I view it in the first iteration
it appears as
0.0575342
The next one is
0.115068
and the 10th one is
0.575342
and finally the 365 one is
21.0575
However if I multiply the original number by 365 I get the following
21.0000000000000125
Which is vastly different from the one I got using a float.
How can I get more precision using MSSQL float? Am I using the wrong
Datatype'
TIA
Mark
=================================
2006MJGOOGLENEWSDon't use FLOAT it is not accurate in terms of precision
What you get if you use DECIMAL datatype intead?
<MarkusJNZ@.gmail.com> wrote in message
news:1159441537.669380.150810@.b28g2000cwb.googlegroups.com...
> Hi, I have a SP which adds a bunch of the same number together 365
> times
> The base number is 0.0575342465753425
> I am storing this as a float but when I view it in the first iteration
> it appears as
> 0.0575342
> The next one is
> 0.115068
> and the 10th one is
> 0.575342
> and finally the 365 one is
> 21.0575
> However if I multiply the original number by 365 I get the following
> 21.0000000000000125
> Which is vastly different from the one I got using a float.
> How can I get more precision using MSSQL float? Am I using the wrong
> Datatype'
> TIA
> Mark
> =================================
> 2006MJGOOGLENEWS
>|||MarkusJNZ@.gmail.com wrote:
> Hi, I have a SP which adds a bunch of the same number together 365
> times
> The base number is 0.0575342465753425
> I am storing this as a float but when I view it in the first iteration
> it appears as
> 0.0575342
> The next one is
> 0.115068
> and the 10th one is
> 0.575342
> and finally the 365 one is
> 21.0575
> However if I multiply the original number by 365 I get the following
> 21.0000000000000125
> Which is vastly different from the one I got using a float.
> How can I get more precision using MSSQL float? Am I using the wrong
> Datatype'
> TIA
> Mark
> =================================
> 2006MJGOOGLENEWS
>
From Books Online:
"Floating point data is approximate; not all values in the data type
range can be precisely represented."
Float is not a precise data type, use DECIMAL or one of the other
numeric types instead...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||On 28 Sep 2006 04:05:37 -0700, MarkusJNZ@.gmail.com wrote:

>Hi, I have a SP which adds a bunch of the same number together 365
>times
>The base number is 0.0575342465753425
>I am storing this as a float but when I view it in the first iteration
>it appears as
>0.0575342
>The next one is
>0.115068
>and the 10th one is
>0.575342
>and finally the 365 one is
>21.0575
>However if I multiply the original number by 365 I get the following
>21.0000000000000125
>Which is vastly different from the one I got using a float.
>How can I get more precision using MSSQL float? Am I using the wrong
>Datatype'
Hi Mark,
Nothing wrong with the datatype - the pproblem is in the code. Since the
result is off by 0.0575, which is exactly the number you start with, I'd
double-check the code - you're probably adding the same number 366 times
instead of 365 times.
Here's some code I used (note the CAST near the end to force display of
numbers to the far right of the decimal point):
declare @.flt float, @.res float, @.i int
set @.flt = 0.0575342465753425
set @.res = 0
set @.i = 0
while @.i < 365
begin
set @.i = @.i + 1
set @.res = @.res + @.flt
end
select cast(@.res as decimal(38,30))
select cast(@.flt * 365.0 as decimal(38,30))
Results:
---
21.000000000000046000000000000000
---
21.000000000000014000000000000000
As you see, there is SOME loss of precision, but not quites as much as
you had.
Incidentally, if you change the datatypes of @.flt and @.res in the code
above to decimal(38,10), the results change to
---
21.000000000000012500000000000000
---
21.000000000000012500000000000000
Hugo Kornelis, SQL Server MVP|||Thanks everyone for your help.
Hug, you were right, I was adding it 1 more than I needed to; late
night programming lol
Thanks
Mark
Hugo Kornelis wrote:
> On 28 Sep 2006 04:05:37 -0700, MarkusJNZ@.gmail.com wrote:
>
> Hi Mark,
> Nothing wrong with the datatype - the pproblem is in the code. Since the
> result is off by 0.0575, which is exactly the number you start with, I'd
> double-check the code - you're probably adding the same number 366 times
> instead of 365 times.
> Here's some code I used (note the CAST near the end to force display of
> numbers to the far right of the decimal point):
> declare @.flt float, @.res float, @.i int
> set @.flt = 0.0575342465753425
> set @.res = 0
> set @.i = 0
> while @.i < 365
> begin
> set @.i = @.i + 1
> set @.res = @.res + @.flt
> end
> select cast(@.res as decimal(38,30))
> select cast(@.flt * 365.0 as decimal(38,30))
> Results:
>
> ---
> 21.000000000000046000000000000000
>
> ---
> 21.000000000000014000000000000000
> As you see, there is SOME loss of precision, but not quites as much as
> you had.
> Incidentally, if you change the datatypes of @.flt and @.res in the code
> above to decimal(38,10), the results change to
>
> ---
> 21.000000000000012500000000000000
>
> ---
> 21.000000000000012500000000000000
>
> --
> Hugo Kornelis, SQL Server MVP

Floating point fun

I'm trying to INSERT the value 4.1 into a FLOAT field as part of a data
migration. I've read certain floating-point values can't be represented
accurately, however, .1 doesn't look like one of them as the FLOAT(2) field
copes with it. Also, why does 4.1 round to .0999999999999996 but 0.1 round
to .10000000000000001? Converting the column to DECIMAL is probably not an
option.
Thanks
Damien
CREATE TABLE #float_test ( ft_id INT PRIMARY KEY, rate1 FLOAT, rate2
FLOAT(2) )
-- Try and insert the value 4.1 into the float table
INSERT INTO #float_test ( ft_id, rate1 )
SELECT 1, 4.1 UNION
SELECT 2, 4 + .1 UNION
SELECT 3, '4.10' UNION
SELECT 4, 4.11 UNION
SELECT 5, 4.95 UNION
SELECT 6, CONVERT( REAL, 4.1, 0 ) UNION
SELECT 7, .1
GO
UPDATE #float_test
SET rate2 = rate1
SELECT * FROM #float_test
DROP TABLE #float_testHi
Read http://www.aspfaq.com/show.asp?id=2477
"Damien" <Damien@.discussions.microsoft.com> wrote in message
news:C4AF11D4-0AD6-4EE3-8453-FFF203829E25@.microsoft.com...
> I'm trying to INSERT the value 4.1 into a FLOAT field as part of a data
> migration. I've read certain floating-point values can't be represented
> accurately, however, .1 doesn't look like one of them as the FLOAT(2)
> field
> copes with it. Also, why does 4.1 round to .0999999999999996 but 0.1
> round
> to .10000000000000001? Converting the column to DECIMAL is probably not
> an
> option.
> Thanks
> Damien
> CREATE TABLE #float_test ( ft_id INT PRIMARY KEY, rate1 FLOAT, rate2
> FLOAT(2) )
> -- Try and insert the value 4.1 into the float table
> INSERT INTO #float_test ( ft_id, rate1 )
> SELECT 1, 4.1 UNION
> SELECT 2, 4 + .1 UNION
> SELECT 3, '4.10' UNION
> SELECT 4, 4.11 UNION
> SELECT 5, 4.95 UNION
> SELECT 6, CONVERT( REAL, 4.1, 0 ) UNION
> SELECT 7, .1
> GO
> UPDATE #float_test
> SET rate2 = rate1
> SELECT * FROM #float_test
> DROP TABLE #float_test
>|||On Tue, 23 Aug 2005 01:43:07 -0700, Damien
<Damien@.discussions.microsoft.com> wrote:

>I'm trying to INSERT the value 4.1 into a FLOAT field as part of a data
>migration. I've read certain floating-point values can't be represented
>accurately, however, .1 doesn't look like one of them as the FLOAT(2) field
>copes with it. Also, why does 4.1 round to .0999999999999996 but 0.1 round
>to .10000000000000001? Converting the column to DECIMAL is probably not an
>option.
It's not clear to me what you expect to happen. Floating-point values
*are* precisely represented by floating-point values. (cough)
OTOH, certain fractional values are not in the domain of certain
floating-point data types. In those cases, software generally picks
the closest value available. (The result is "error of approximation",
not a rounding error.)
You seem to think that every number that ends in '.1' should have the
same behavior. That's simply not true of floating-point data types.
It might help to think of it this way. Neighboring, distinct values in
exact data types are the same distance apart on a number line. That
is, each value in a SQL INTEGER data type is plus or minus 1 from its
neighbor.
But neighboring, distinct values in a floating-point data type are not
the same distance apart on a number line. The closer you get to zero
(from either direction), the more closely spaced the neighboring
distinct values are.
Mike Sherrill|||> Also, why does 4.1 round to .0999999999999996 but 0.1 round
to .10000000000000001?
because under the hood floats are stored as binaries. So, binary
numbers are represented accurately, up to some accuracy, of course.
Decimals are rounded to binaries. When you convert binaries back to
decimals, expect some mismatch|||On 24 Aug 2005 14:36:10 -0700, ford_desperado@.yahoo.com wrote:
[snip]
>Decimals are rounded to binaries.
Error of approximation, which seems to be what you're stumbling
toward, doesn't mean "fixed point numbers are rounded to binary". See
Knuth, vol 2.

float vs decimal - computation time

I have heard that using floats in calculated fields are much faster than
using decimals. Is this true? What is the role of the floating-point
processor in these computations?
JasonCP Developer (steved@.newsgroup.nospam) writes:
> I have heard that using floats in calculated fields are much faster than
> using decimals. Is this true? What is the role of the floating-point
> processor in these computations?
Instead of asking again, why not researching the responses to your post
from Wednesday?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Erland et al,
I apologize. I meant to follow-up my earlier post and I realize that it was
both unclear and unnecessary to repost. I have found what I was looking for.
Thank you very much for your help.
CP Developer
"Erland Sommarskog" wrote:

> CP Developer (steved@.newsgroup.nospam) writes:
> Instead of asking again, why not researching the responses to your post
> from Wednesday?
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx
>

Float vs Decimal

Hello, sorry if this question is silly
I'm about difference between Decimal and Float data types , if im
writing accounting application and use 10:4 as precision/scale in all
numbers , does it matters if i choose fields as Decimal or Float in that
case ?
in BOL its says about float that
Approximate number data types for use with floating point numeric data.
Floating point data is approximate; not all values in the data type range
can be precisely represented.
i do not know what that means? can anyone give small example adding 2
different numbers that will give different answers if column type is decimal
than float ?
Best Regards
Bassamfloats store numbers as base 2, decimals as base 10. You can lookup a full
explaination on google, I would not do it justice. Tey this to see how they
differ.
create table Test
(NumDecimal decimal(10,4)
, numFloat float
);
insert into Test (NumDecimal, numFloat) values (0.1, 0.1);
insert into Test (NumDecimal, numFloat) values (0.3, 0.3);
insert into Test (NumDecimal, numFloat) values (0.25, 0.25);
insert into Test (NumDecimal, numFloat) values (1.0/3.0, 1.0/3.0);
insert into Test (NumDecimal, numFloat) values (1.0/6.0, 1.0/6.0);
select * from test;
select numdecimal*3 , numfloat*3 from test;
drop table Test;
"Bassam" <bassam@.nptco.com.eg> wrote in message
news:OpLEDirbGHA.2456@.TK2MSFTNGP04.phx.gbl...
> Hello, sorry if this question is silly
> I'm about difference between Decimal and Float data types , if im
> writing accounting application and use 10:4 as precision/scale in all
> numbers , does it matters if i choose fields as Decimal or Float in that
> case ?
> in BOL its says about float that
> Approximate number data types for use with floating point numeric data.
> Floating point data is approximate; not all values in the data type range
> can be precisely represented.
> i do not know what that means? can anyone give small example adding 2
> different numbers that will give different answers if column type is
decimal
> than float ?
> --
> Best Regards
> Bassam
>
>|||> can anyone give small example adding 2
> different numbers that will give different answers if column type is decim
al
> than float ?
Run below in Query Analyzer and you will see:
DECLARE @.fa float, @.fb float, @.da decimal(10,4), @.db decimal(10,4)
SELECT @.fa = 3.1, @.da = 3.1
SELECT @.fb = 5.5, @.db = 5.5
SELECT @.fa + @.fb
SELECT @.da + @.db
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Bassam" <bassam@.nptco.com.eg> wrote in message news:OpLEDirbGHA.2456@.TK2MSFTNGP04.phx.gbl.
.
> Hello, sorry if this question is silly
> I'm about difference between Decimal and Float data types , if im
> writing accounting application and use 10:4 as precision/scale in all
> numbers , does it matters if i choose fields as Decimal or Float in that
> case ?
> in BOL its says about float that
> Approximate number data types for use with floating point numeric data.
> Floating point data is approximate; not all values in the data type range
> can be precisely represented.
> i do not know what that means? can anyone give small example adding 2
> different numbers that will give different answers if column type is decim
al
> than float ?
> --
> Best Regards
> Bassam
>
>|||I'm not sure you'll get an example by adding 2 numbers, but an
important point to note is that floats will sometimes "miss by a bit",
so you'll find that if you're doing lots of division and multiplication
you might end up with 1.00000000016 rather than 1. Generally your
application will have a natural degree of accuracy which you're working
within, so decimals are much better to use as they will not cause this
kind of behaviour|||Bassam (bassam@.nptco.com.eg) writes:
> Hello, sorry if this question is silly
> I'm about difference between Decimal and Float data types , if im
> writing accounting application and use 10:4 as precision/scale in all
> numbers , does it matters if i choose fields as Decimal or Float in that
> case ?
> in BOL its says about float that
> Approximate number data types for use with floating point numeric data.
> Floating point data is approximate; not all values in the data type range
> can be precisely represented.
> i do not know what that means? can anyone give small example adding 2
> different numbers that will give different answers if column type is
> decimal than float ?
Run this in Query Analyzer:
declare @.d1 decimal(10, 4), @.d2 decimal(10, 4),
@.f1 float, @.f2 float
SELECT @.d1 = 98.234, @.d2 = 87.0987
SELECT @.f1 = 98.234, @.f2 = 87.0987
SELECT @.d1 = 98.234, @.d2 = 87.0987
SELECT @.d1 + @.d2, @.f1 + @.f2
More generally, while is valid and reasonable to write:
WHERE decimalcol = 0
the same is not true for
WHERE floatcal = 0
Because due to rounding errors, floatcol may have a value like
0.0000000000000123
It's possible to use float in an accounting application, but you have to
be very careful. Decimal has its pitfalls too, but is probably safer.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||In an accounting application, exact values (decimal data type) should be
used.
For float and real data types, they are approximate as it a the specified
number of bits to store the mantissa of the float number in scientific
notation, in binary form. The conversion of a decimal value (with decimal
places) to a binary value usually results in a lost of precision.
Try the following.
select convert(decimal(10, 4), 111.1111) as MyDecimalValue,
convert(float(24), 111.1111) as MyFloatValue
Martin C K Poon
Senior Analyst Programmer
====================================
"Bassam" <bassam@.nptco.com.eg> bl
news:OpLEDirbGHA.2456@.TK2MSFTNGP04.phx.gbl g...
> Hello, sorry if this question is silly
> I'm about difference between Decimal and Float data types , if im
> writing accounting application and use 10:4 as precision/scale in all
> numbers , does it matters if i choose fields as Decimal or Float in that
> case ?
> in BOL its says about float that
> Approximate number data types for use with floating point numeric data.
> Floating point data is approximate; not all values in the data type range
> can be precisely represented.
> i do not know what that means? can anyone give small example adding 2
> different numbers that will give different answers if column type is
decimal
> than float ?
> --
> Best Regards
> Bassam
>
>|||you know, when running this in Management Studio I get
@.fa + @.fb = 8.6
@.da + @.db = 8.600
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23VAvd2rbGHA.2396@.TK2MSFTNGP02.phx.gbl...
>
> Run below in Query Analyzer and you will see:
> DECLARE @.fa float, @.fb float, @.da decimal(10,4), @.db decimal(10,4)
> SELECT @.fa = 3.1, @.da = 3.1
> SELECT @.fb = 5.5, @.db = 5.5
> SELECT @.fa + @.fb
> SELECT @.da + @.db
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Bassam" <bassam@.nptco.com.eg> wrote in message
> news:OpLEDirbGHA.2456@.TK2MSFTNGP04.phx.gbl...|||Presenting the values returned (in binary format) from SQL Server is the tas
k of the client
application. Apparently, SSMS assumes that you aren't that concerned about a
ll the decimals when you
use float and real, while QA is more exact in the representation of these va
lues.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Steve" <ss@.Mailinator.com> wrote in message news:ufjgO$rbGHA.3800@.TK2MSFTNGP04.phx.gbl...[
color=darkred]
> you know, when running this in Management Studio I get
> @.fa + @.fb = 8.6
> @.da + @.db = 8.600
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:%23VAvd2rbGHA.2396@.TK2MSFTNGP02.phx.gbl...
>[/color]|||For completeness... what are the pitfalls of the Decimal datatype? I've
always found that as long as I'm careful with the precision the results
are accurate.|||I'd rather have the results from SSMS include all the decimals. Anyway to
force that, or is there an option to change?
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OAme4FsbGHA.3388@.TK2MSFTNGP05.phx.gbl...
> Presenting the values returned (in binary format) from SQL Server is the
> task of the client application. Apparently, SSMS assumes that you aren't
> that concerned about all the decimals when you use float and real, while
> QA is more exact in the representation of these values.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Steve" <ss@.Mailinator.com> wrote in message
> news:ufjgO$rbGHA.3800@.TK2MSFTNGP04.phx.gbl...
>sql

float vs decimal

select convert(float,'1.2334e+006')
1233400.0

select convert(decimal(20,2),'1.2334e+006')
Server: Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to numeric.

Is there any way around?
Is there any set options? I tried arithabort or arithignore and they
don't work.
Thanks.(othellomy@.yahoo.com) writes:

Quote:

Originally Posted by

select convert(float,'1.2334e+006')
1233400.0
>
select convert(decimal(20,2),'1.2334e+006')
Server: Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to numeric.
>
Is there any way around?
Is there any set options? I tried arithabort or arithignore and they
don't work.


1.2334e+006 is not a legal literal for decimal. You will have to convert
in two steps, first to float, then to decimal.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Am 21 Nov 2006 22:09:05 -0800 schrieb othellomy@.yahoo.com:

Quote:

Originally Posted by

select convert(float,'1.2334e+006')
1233400.0
>
select convert(decimal(20,2),'1.2334e+006')
Server: Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to numeric.
>
Is there any way around?
Is there any set options? I tried arithabort or arithignore and they
don't work.
Thanks.


select convert(decimal(20,2),cast('1.2334e+006' as float))

bye,
Helmut

Float type

I inhereted a database that has a lot of Float type columns. Typically
these columns hold decimal-type data rounded to four decimal points
such as:
987.1234
Is Float the appropriate data type for use with these types of columns?
Float is generally referred to as an approximate datatype (approximate for the 10.base system, which
us humans tend to use). This mean that a value you input might not be the one which is stored, just
try below:
SELECT CAST(3.1 AS float)
If above is not acceptable, then use NUMERIC with a scale of 4 instead, like:
SELECT CAST(3.1 AS numeric(9,4))
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"laurenq uantrell" <laurenquantrell@.hotmail.com> wrote in message
news:1135913496.671119.91530@.g49g2000cwa.googlegro ups.com...
>I inhereted a database that has a lot of Float type columns. Typically
> these columns hold decimal-type data rounded to four decimal points
> such as:
> 987.1234
> Is Float the appropriate data type for use with these types of columns?
>

Float type

I inhereted a database that has a lot of Float type columns. Typically
these columns hold decimal-type data rounded to four decimal points
such as:
987.1234
Is Float the appropriate data type for use with these types of columns?Float is generally referred to as an approximate datatype (approximate for t
he 10.base system, which
us humans tend to use). This mean that a value you input might not be the on
e which is stored, just
try below:
SELECT CAST(3.1 AS float)
If above is not acceptable, then use NUMERIC with a scale of 4 instead, like
:
SELECT CAST(3.1 AS numeric(9,4))
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"laurenq uantrell" <laurenquantrell@.hotmail.com> wrote in message
news:1135913496.671119.91530@.g49g2000cwa.googlegroups.com...
>I inhereted a database that has a lot of Float type columns. Typically
> these columns hold decimal-type data rounded to four decimal points
> such as:
> 987.1234
> Is Float the appropriate data type for use with these types of columns?
>

Float type

I inhereted a database that has a lot of Float type columns. Typically
these columns hold decimal-type data rounded to four decimal points
such as:
987.1234
Is Float the appropriate data type for use with these types of columns?Float is generally referred to as an approximate datatype (approximate for the 10.base system, which
us humans tend to use). This mean that a value you input might not be the one which is stored, just
try below:
SELECT CAST(3.1 AS float)
If above is not acceptable, then use NUMERIC with a scale of 4 instead, like:
SELECT CAST(3.1 AS numeric(9,4))
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"laurenq uantrell" <laurenquantrell@.hotmail.com> wrote in message
news:1135913496.671119.91530@.g49g2000cwa.googlegroups.com...
>I inhereted a database that has a lot of Float type columns. Typically
> these columns hold decimal-type data rounded to four decimal points
> such as:
> 987.1234
> Is Float the appropriate data type for use with these types of columns?
>

float to decimal without rounding

select 'Customer_Greeting_Section_total'=
Case when
Customer_Greeting_Section_total is null then 0.00
else left (ROUND(Customer_Greeting_Section_Total , 2, 1),4)
end
from DTSTEMP1
The col is defined as float
When I run this I get
Server: Msg 8115, Level 16, State 8, Line 1
Arithmetic overflow error converting numeric to data type numeric.Hi
It is not clear why you are using left, as this a string function as doing
this may be meaningless. Removing the left function will (probably) stop the
error. See http://www.aspfaq.com/etiquette.asp?id=5006 on how to post DDL an
d
example data will help to solve your problem. Posting your desired results
from the query is also useful.
John
"Disney" wrote:

> select 'Customer_Greeting_Section_total'=
> Case when
> Customer_Greeting_Section_total is null then 0.00
> else left (ROUND(Customer_Greeting_Section_Total , 2, 1),4)
> end
> from DTSTEMP1
> The col is defined as float
> When I run this I get
> Server: Msg 8115, Level 16, State 8, Line 1
> Arithmetic overflow error converting numeric to data type numeric.sql

Float to Decimal Conversion - Transaction Log Fills Up

Hi,
I am trying to change multiple columns on multiple tables to decimal
28,8 from float. Everytime I attempt to do this, the transaction log
fills up and the process stops. I have attempted this via T-SQL all to
no avail.
What is the correct way of doing this?
SQL Server 7 is the version being used.
Thanks,
Tony.
If the tables are small enough, do only one table then backup the
transaction log. If the tables are still too large, you may have to create
another table with the intended datatypes, insert data in stages, backing up
the log after each stage. Then, drop the original table and rename the new
table.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
..
"T Kennedy" <tony.kennedy@.intl.pepsico.com> wrote in message
news:ebc9c5a7.0502010311.54fd362d@.posting.google.c om...
Hi,
I am trying to change multiple columns on multiple tables to decimal
28,8 from float. Everytime I attempt to do this, the transaction log
fills up and the process stops. I have attempted this via T-SQL all to
no avail.
What is the correct way of doing this?
SQL Server 7 is the version being used.
Thanks,
Tony.
|||To add on to Tom's response, you can avoid filling the log if you have the
'select into' database option on (SIMPLE/BULK_LOGGED recovery model in SQL
2000) by creating a new table with a minimally-logged SELECT ... INTO. You
may need to add ISNULL to coerce NOT NULL for converted columns that are NOT
NULL in the source table.
CREATE TABLE MyTable
(
Col1 float not null,
Col2 float null
)
GO
SELECT
ISNULL(CAST(Col1 AS decimal(28, 8)), 0) AS Col1,
CAST(Col2 AS decimal(28, 8)) AS Col2
INTO MyTable_New
FROM MyTable
GO
DROP TABLE MyTable
EXEC sp_rename 'MyTable_New', 'MyTable'
--recreate constraints and indexes
GO
Hope this helps.
Dan Guzman
SQL Server MVP
"T Kennedy" <tony.kennedy@.intl.pepsico.com> wrote in message
news:ebc9c5a7.0502010311.54fd362d@.posting.google.c om...
> Hi,
> I am trying to change multiple columns on multiple tables to decimal
> 28,8 from float. Everytime I attempt to do this, the transaction log
> fills up and the process stops. I have attempted this via T-SQL all to
> no avail.
> What is the correct way of doing this?
> SQL Server 7 is the version being used.
> Thanks,
> Tony.

Float to Decimal Conversion - Transaction Log Fills Up

Hi,
I am trying to change multiple columns on multiple tables to decimal
28,8 from float. Everytime I attempt to do this, the transaction log
fills up and the process stops. I have attempted this via T-SQL all to
no avail.
What is the correct way of doing this?
SQL Server 7 is the version being used.
Thanks,
Tony.If the tables are small enough, do only one table then backup the
transaction log. If the tables are still too large, you may have to create
another table with the intended datatypes, insert data in stages, backing up
the log after each stage. Then, drop the original table and rename the new
table.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
.
"T Kennedy" <tony.kennedy@.intl.pepsico.com> wrote in message
news:ebc9c5a7.0502010311.54fd362d@.posting.google.com...
Hi,
I am trying to change multiple columns on multiple tables to decimal
28,8 from float. Everytime I attempt to do this, the transaction log
fills up and the process stops. I have attempted this via T-SQL all to
no avail.
What is the correct way of doing this?
SQL Server 7 is the version being used.
Thanks,
Tony.|||To add on to Tom's response, you can avoid filling the log if you have the
'select into' database option on (SIMPLE/BULK_LOGGED recovery model in SQL
2000) by creating a new table with a minimally-logged SELECT ... INTO. You
may need to add ISNULL to coerce NOT NULL for converted columns that are NOT
NULL in the source table.
CREATE TABLE MyTable
(
Col1 float not null,
Col2 float null
)
GO
SELECT
ISNULL(CAST(Col1 AS decimal(28, 8)), 0) AS Col1,
CAST(Col2 AS decimal(28, 8)) AS Col2
INTO MyTable_New
FROM MyTable
GO
DROP TABLE MyTable
EXEC sp_rename 'MyTable_New', 'MyTable'
--recreate constraints and indexes
GO
Hope this helps.
Dan Guzman
SQL Server MVP
"T Kennedy" <tony.kennedy@.intl.pepsico.com> wrote in message
news:ebc9c5a7.0502010311.54fd362d@.posting.google.com...
> Hi,
> I am trying to change multiple columns on multiple tables to decimal
> 28,8 from float. Everytime I attempt to do this, the transaction log
> fills up and the process stops. I have attempted this via T-SQL all to
> no avail.
> What is the correct way of doing this?
> SQL Server 7 is the version being used.
> Thanks,
> Tony.

Float to Decimal Conversion - Transaction Log Fills Up

Hi,
I am trying to change multiple columns on multiple tables to decimal
28,8 from float. Everytime I attempt to do this, the transaction log
fills up and the process stops. I have attempted this via T-SQL all to
no avail.
What is the correct way of doing this?
SQL Server 7 is the version being used.
Thanks,
Tony.If the tables are small enough, do only one table then backup the
transaction log. If the tables are still too large, you may have to create
another table with the intended datatypes, insert data in stages, backing up
the log after each stage. Then, drop the original table and rename the new
table.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
.
"T Kennedy" <tony.kennedy@.intl.pepsico.com> wrote in message
news:ebc9c5a7.0502010311.54fd362d@.posting.google.com...
Hi,
I am trying to change multiple columns on multiple tables to decimal
28,8 from float. Everytime I attempt to do this, the transaction log
fills up and the process stops. I have attempted this via T-SQL all to
no avail.
What is the correct way of doing this?
SQL Server 7 is the version being used.
Thanks,
Tony.|||To add on to Tom's response, you can avoid filling the log if you have the
'select into' database option on (SIMPLE/BULK_LOGGED recovery model in SQL
2000) by creating a new table with a minimally-logged SELECT ... INTO. You
may need to add ISNULL to coerce NOT NULL for converted columns that are NOT
NULL in the source table.
CREATE TABLE MyTable
(
Col1 float not null,
Col2 float null
)
GO
SELECT
ISNULL(CAST(Col1 AS decimal(28, 8)), 0) AS Col1,
CAST(Col2 AS decimal(28, 8)) AS Col2
INTO MyTable_New
FROM MyTable
GO
DROP TABLE MyTable
EXEC sp_rename 'MyTable_New', 'MyTable'
--recreate constraints and indexes
GO
--
Hope this helps.
Dan Guzman
SQL Server MVP
"T Kennedy" <tony.kennedy@.intl.pepsico.com> wrote in message
news:ebc9c5a7.0502010311.54fd362d@.posting.google.com...
> Hi,
> I am trying to change multiple columns on multiple tables to decimal
> 28,8 from float. Everytime I attempt to do this, the transaction log
> fills up and the process stops. I have attempted this via T-SQL all to
> no avail.
> What is the correct way of doing this?
> SQL Server 7 is the version being used.
> Thanks,
> Tony.

Float to Datetime Conversion

I need to convert values in a float data type field to that of datetime. The float data type field currently contains values such as 20060927,20060928, etc. Any suggestions?
Thanks in advance,
sajmeraconvert(datetime,cast(cast(foo as integer) as char),112)|||Thanks for the quick reply. I also tried the following and got the result.

convert(datetime,convert(varchar(20),convert(int,c onvert(float,<field name>))))

Thanks again!|||SELECT CAST(CONVERT(VARCHAR, Col1) AS DATETIME) AS NewValue
FROM Table1

Float return

When the table below is created -the data selected
is different for values > 10. Does some one know why
float behaves this way ? - I am stumped
create table tempdb.dbo.TestValue (ColId int, TheValue
Float)
Insert into TestValue Values (1, 10.25)
Insert into TestValue Values (2, 10.99)
Insert into TestValue Values (3, 9.9)
Insert into TestValue Values (4, 6.59)
select * from TestValue
Results:
========
1 10.25
2 10.99
3 9.9000000000000004
4 6.5899999999999999PBrent
Read up "float and real" chapter in the BOL as well as visit on Aaron's web
site www.aspfaq.com to get more info and examples whu this datatype behaves
this way.
"PBrent" <PBrent@.discussions.microsoft.com> wrote in message
news:23d001c53f65$e8aff6a0$a401280a@.phx.gbl...
> When the table below is created -the data selected
> is different for values > 10. Does some one know why
> float behaves this way ? - I am stumped
> create table tempdb.dbo.TestValue (ColId int, TheValue
> Float)
> Insert into TestValue Values (1, 10.25)
> Insert into TestValue Values (2, 10.99)
> Insert into TestValue Values (3, 9.9)
> Insert into TestValue Values (4, 6.59)
> select * from TestValue
> Results:
> ========
> 1 10.25
> 2 10.99
> 3 9.9000000000000004
> 4 6.5899999999999999|||It's nothing special about 10. If you insert the values 16.9 into a float,
the actual floating-point value stored is just under 16.9, and you get this
Insert into TestValue Values (5, 16.9)
...
16.899999999999999
Of the numbers you inserted into the table, only 10.25 can be
stored exactly as a float. The others are stored as the nearest
representable floating-point value. When these approximations
are converted back to decimals for display, sometimes you see
the difference from the original number you tried to enter, and
sometimes you are lucky and they are rounded back to the
number you started with.
Steve Kass
Drew University
PBrent wrote:

>When the table below is created -the data selected
>is different for values > 10. Does some one know why
>float behaves this way ? - I am stumped
>create table tempdb.dbo.TestValue (ColId int, TheValue
>Float)
>Insert into TestValue Values (1, 10.25)
>Insert into TestValue Values (2, 10.99)
>Insert into TestValue Values (3, 9.9)
>Insert into TestValue Values (4, 6.59)
>select * from TestValue
>Results:
>========
>1 10.25
>2 10.99
>3 9.9000000000000004
>4 6.5899999999999999
>

float point error

We are still seeing this error:
http://support.microsoft.com/default...b;en-us;818899
on the latest version of sqlserver2k :
select @.@.version
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows
NT 5.0 (Build 2195: Service Pack 4)
Does anyone know when MS will release an official patch. Suposedly, the
have a dll then can give you but nothing official. This is kindof a pretty
bad bug to leave open.
> We are still seeing this error:
> http://support.microsoft.com/default...b;en-us;818899
Well, did you follow the instructions in the article, by contacting
Microsoft product support and obtaining the .807 hotfix (which is later than
the "latest version" of .760)? There is no fee for the call or the hotfix
itself if you demonstrate to them that you are affected by the issue the
hotfix fixes.
Otherwise, you can try to find later patches (e.g. see
http://www.microsoft.com/technet/sec.../ms03-031.mspx which
updates you to .818).
Barring those two actions, you will have to wait for SP4.

> This is kindof a pretty bad bug to leave open.
Well, that really depends on how many users it has affected, doesn't it?
http://www.aspfaq.com/
(Reverse address to reply.)
|||As you know, SQL Server QFEs are cumulative. The fix described in this
article is Build 2000.00.0807. The latest publicly available hot fix is
Build .0878, which would include a fix for this error.
http://support.microsoft.com/?kbid=838166
Also know that SP4 is currently in Beta testing and will include builds up
to .0972.
Sincerely,
Anthony Thomas

"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:OrJl5DOAFHA.824@.TK2MSFTNGP11.phx.gbl...
> We are still seeing this error:
> http://support.microsoft.com/default...b;en-us;818899
Well, did you follow the instructions in the article, by contacting
Microsoft product support and obtaining the .807 hotfix (which is later than
the "latest version" of .760)? There is no fee for the call or the hotfix
itself if you demonstrate to them that you are affected by the issue the
hotfix fixes.
Otherwise, you can try to find later patches (e.g. see
http://www.microsoft.com/technet/sec.../ms03-031.mspx which
updates you to .818).
Barring those two actions, you will have to wait for SP4.

> This is kindof a pretty bad bug to leave open.
Well, that really depends on how many users it has affected, doesn't it?
http://www.aspfaq.com/
(Reverse address to reply.)
|||> As you know, SQL Server QFEs are cumulative.
That is true until .977. For example, to install .993 on .760, you first
need to get to the .977 hotfix installer -- .993 won't install on < .977 (it
will complain about missing prerequisites).

> The fix described in this
> article is Build 2000.00.0807. The latest publicly available hot fix is
> Build .0878, which would include a fix for this error.
However, it is not always the best to just install the latest. He may
prefer to go through PSS, demonstrate that .807 is his issue, and fix that.
..878 might bring about other problems that he doesn't have time to fully
test. Sure, it might be more convenient to get a patch that is publicly
available, but I don't jump to the conclusion that it is absolutely the best
answer.

> Also know that SP4 is currently in Beta testing and will include builds up
> to .0972.
And then the numbering scheme jumps significantly (SP4 beta is .2026, yet
there are several .973+ hotfixes already available).
I'm still curious why they chose to break at .977 to use the new hotfix
installer, breaking the chain of cumulative hotfixes. It would have been a
much more logical break, IMHO, to wait for SP4 -- introduce the new hotfix
installer at a stable, fully tested service pack... <shrug>
A
|||Yes, I found this out with .0859. The biggest reason I jumped on .0878, it
seemed more stable.
I also noticed the large build increase on deploying the SP4 Beta (2026?)
However, from the fix list off of the beta description, it only includes
fixes through .0972 and I've seen KB listing all the way up to .1000 +. So,
I'm not sure how a Build including only fixes to the 972 level could be
labeled 2026. That's got me stumped. Not to mention that it bombs the
replication if you've already applied 878. I've got that thread running in
the Beta newsgroup.
Now, I wouldn't want to slam PSS, because they've been very helpful,
especially in crash circumstances; however, they have been known to push hot
fixes a little too eagerly as well. I figure once it has gone public, at
least, it has somewhat stabilized. But yes, I realize, that even SP level
code bases can introduce new bugs.
As always, thanks for your insight.
Sincerely,
Anthony Thomas

"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23zfCiKbAFHA.3940@.TK2MSFTNGP09.phx.gbl...
> As you know, SQL Server QFEs are cumulative.
That is true until .977. For example, to install .993 on .760, you first
need to get to the .977 hotfix installer -- .993 won't install on < .977 (it
will complain about missing prerequisites).

> The fix described in this
> article is Build 2000.00.0807. The latest publicly available hot fix is
> Build .0878, which would include a fix for this error.
However, it is not always the best to just install the latest. He may
prefer to go through PSS, demonstrate that .807 is his issue, and fix that.
..878 might bring about other problems that he doesn't have time to fully
test. Sure, it might be more convenient to get a patch that is publicly
available, but I don't jump to the conclusion that it is absolutely the best
answer.

> Also know that SP4 is currently in Beta testing and will include builds up
> to .0972.
And then the numbering scheme jumps significantly (SP4 beta is .2026, yet
there are several .973+ hotfixes already available).
I'm still curious why they chose to break at .977 to use the new hotfix
installer, breaking the chain of cumulative hotfixes. It would have been a
much more logical break, IMHO, to wait for SP4 -- introduce the new hotfix
installer at a stable, fully tested service pack... <shrug>
A
|||> Yes, I found this out with .0859. The biggest reason I jumped on .0878,
it
> seemed more stable.
I've heard many similar complaints.

> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
I'm not sure how they're going to deal with this (other than slip the other
fixes in before release). BTW, can you share any articles that are 1000+?
The highest I can find is .993 (and not using the pitiful on-again off-again
search at support.microsoft.com).
|||> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
So,
> I'm not sure how a Build including only fixes to the 972 level could be
> labeled 2026. That's got me stumped.
My guess is that the hotfixes that have been pushed since December 9th (when
2026 was forged) have been worked into both branches, and will be included
in SP4 when it goes live... what that means for the beta process, I'm not
sure... clearly we can't be testing everything right up to the point of
release, and we're already using a build that's behind on at least 6 unique
hotfixes so far.
A
|||Yea, I agree; they have to cut the beta release off at some point. I've
asked about the build number with no response though. I think it was a goof
but until I hear otherwise, we'll have to take it as they put it.
Anthony Thomas

"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23c8UxPcAFHA.3264@.TK2MSFTNGP12.phx.gbl...
> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
So,
> I'm not sure how a Build including only fixes to the 972 level could be
> labeled 2026. That's got me stumped.
My guess is that the hotfixes that have been pushed since December 9th (when
2026 was forged) have been worked into both branches, and will be included
in SP4 when it goes live... what that means for the beta process, I'm not
sure... clearly we can't be testing everything right up to the point of
release, and we're already using a build that's behind on at least 6 unique
hotfixes so far.
A
|||Yea, that's why I said .1000 +, I know I came across one article that listed
a .1193 or something like that and have been searching ever since but no
luck...yet.
I also came across a slip-steamed install for MSDE for the new, free MS ADS
(?) server. It's an SUS system for deploying patches to Server Systems. It
had a build of 8.00.0880 but can't find a build description or why it was
inserted into this installation. MS also slip-streamed SP3a, of course, and
MS03-031, individually, like 880 wouldn't install without it.
Anthony Thomas

"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uCtTUMcAFHA.3088@.TK2MSFTNGP10.phx.gbl...
> Yes, I found this out with .0859. The biggest reason I jumped on .0878,
it
> seemed more stable.
I've heard many similar complaints.

> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
I'm not sure how they're going to deal with this (other than slip the other
fixes in before release). BTW, can you share any articles that are 1000+?
The highest I can find is .993 (and not using the pitiful on-again off-again
search at support.microsoft.com).

float point error

We are still seeing this error:
http://support.microsoft.com/defaul...kb;en-us;818899
on the latest version of sqlserver2k :
select @.@.version
--
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows
NT 5.0 (Build 2195: Service Pack 4)
Does anyone know when MS will release an official patch. Suposedly, the
have a dll then can give you but nothing official. This is kindof a pretty
bad bug to leave open.> We are still seeing this error:
> http://support.microsoft.com/defaul...kb;en-us;818899
Well, did you follow the instructions in the article, by contacting
Microsoft product support and obtaining the .807 hotfix (which is later than
the "latest version" of .760)? There is no fee for the call or the hotfix
itself if you demonstrate to them that you are affected by the issue the
hotfix fixes.
Otherwise, you can try to find later patches (e.g. see
http://www.microsoft.com/technet/se...n/ms03-031.mspx which
updates you to .818).
Barring those two actions, you will have to wait for SP4.

> This is kindof a pretty bad bug to leave open.
Well, that really depends on how many users it has affected, doesn't it?
http://www.aspfaq.com/
(Reverse address to reply.)|||As you know, SQL Server QFEs are cumulative. The fix described in this
article is Build 2000.00.0807. The latest publicly available hot fix is
Build .0878, which would include a fix for this error.
http://support.microsoft.com/?kbid=838166
Also know that SP4 is currently in Beta testing and will include builds up
to .0972.
Sincerely,
Anthony Thomas
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:OrJl5DOAFHA.824@.TK2MSFTNGP11.phx.gbl...
> We are still seeing this error:
> http://support.microsoft.com/defaul...kb;en-us;818899
Well, did you follow the instructions in the article, by contacting
Microsoft product support and obtaining the .807 hotfix (which is later than
the "latest version" of .760)? There is no fee for the call or the hotfix
itself if you demonstrate to them that you are affected by the issue the
hotfix fixes.
Otherwise, you can try to find later patches (e.g. see
http://www.microsoft.com/technet/se...n/ms03-031.mspx which
updates you to .818).
Barring those two actions, you will have to wait for SP4.

> This is kindof a pretty bad bug to leave open.
Well, that really depends on how many users it has affected, doesn't it?
http://www.aspfaq.com/
(Reverse address to reply.)|||> As you know, SQL Server QFEs are cumulative.
That is true until .977. For example, to install .993 on .760, you first
need to get to the .977 hotfix installer -- .993 won't install on < .977 (it
will complain about missing prerequisites).

> The fix described in this
> article is Build 2000.00.0807. The latest publicly available hot fix is
> Build .0878, which would include a fix for this error.
However, it is not always the best to just install the latest. He may
prefer to go through PSS, demonstrate that .807 is his issue, and fix that.
.878 might bring about other problems that he doesn't have time to fully
test. Sure, it might be more convenient to get a patch that is publicly
available, but I don't jump to the conclusion that it is absolutely the best
answer.

> Also know that SP4 is currently in Beta testing and will include builds up
> to .0972.
And then the numbering scheme jumps significantly (SP4 beta is .2026, yet
there are several .973+ hotfixes already available).
I'm still curious why they chose to break at .977 to use the new hotfix
installer, breaking the chain of cumulative hotfixes. It would have been a
much more logical break, IMHO, to wait for SP4 -- introduce the new hotfix
installer at a stable, fully tested service pack... <shrug>
A|||Yes, I found this out with .0859. The biggest reason I jumped on .0878, it
seemed more stable.
I also noticed the large build increase on deploying the SP4 Beta (2026?)
However, from the fix list off of the beta description, it only includes
fixes through .0972 and I've seen KB listing all the way up to .1000 +. So,
I'm not sure how a Build including only fixes to the 972 level could be
labeled 2026. That's got me stumped. Not to mention that it bombs the
replication if you've already applied 878. I've got that thread running in
the Beta newsgroup.
Now, I wouldn't want to slam PSS, because they've been very helpful,
especially in crash circumstances; however, they have been known to push hot
fixes a little too eagerly as well. I figure once it has gone public, at
least, it has somewhat stabilized. But yes, I realize, that even SP level
code bases can introduce new bugs.
As always, thanks for your insight.
Sincerely,
Anthony Thomas
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23zfCiKbAFHA.3940@.TK2MSFTNGP09.phx.gbl...
> As you know, SQL Server QFEs are cumulative.
That is true until .977. For example, to install .993 on .760, you first
need to get to the .977 hotfix installer -- .993 won't install on < .977 (it
will complain about missing prerequisites).

> The fix described in this
> article is Build 2000.00.0807. The latest publicly available hot fix is
> Build .0878, which would include a fix for this error.
However, it is not always the best to just install the latest. He may
prefer to go through PSS, demonstrate that .807 is his issue, and fix that.
.878 might bring about other problems that he doesn't have time to fully
test. Sure, it might be more convenient to get a patch that is publicly
available, but I don't jump to the conclusion that it is absolutely the best
answer.

> Also know that SP4 is currently in Beta testing and will include builds up
> to .0972.
And then the numbering scheme jumps significantly (SP4 beta is .2026, yet
there are several .973+ hotfixes already available).
I'm still curious why they chose to break at .977 to use the new hotfix
installer, breaking the chain of cumulative hotfixes. It would have been a
much more logical break, IMHO, to wait for SP4 -- introduce the new hotfix
installer at a stable, fully tested service pack... <shrug>
A|||> Yes, I found this out with .0859. The biggest reason I jumped on .0878,
it
> seemed more stable.
I've heard many similar complaints.

> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
I'm not sure how they're going to deal with this (other than slip the other
fixes in before release). BTW, can you share any articles that are 1000+?
The highest I can find is .993 (and not using the pitiful on-again off-again
search at support.microsoft.com).|||> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
So,
> I'm not sure how a Build including only fixes to the 972 level could be
> labeled 2026. That's got me stumped.
My guess is that the hotfixes that have been pushed since December 9th (when
2026 was forged) have been worked into both branches, and will be included
in SP4 when it goes live... what that means for the beta process, I'm not
sure... clearly we can't be testing everything right up to the point of
release, and we're already using a build that's behind on at least 6 unique
hotfixes so far.
A|||Yea, I agree; they have to cut the beta release off at some point. I've
asked about the build number with no response though. I think it was a goof
but until I hear otherwise, we'll have to take it as they put it.
Anthony Thomas
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23c8UxPcAFHA.3264@.TK2MSFTNGP12.phx.gbl...
> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
So,
> I'm not sure how a Build including only fixes to the 972 level could be
> labeled 2026. That's got me stumped.
My guess is that the hotfixes that have been pushed since December 9th (when
2026 was forged) have been worked into both branches, and will be included
in SP4 when it goes live... what that means for the beta process, I'm not
sure... clearly we can't be testing everything right up to the point of
release, and we're already using a build that's behind on at least 6 unique
hotfixes so far.
A|||Yea, that's why I said .1000 +, I know I came across one article that listed
a .1193 or something like that and have been searching ever since but no
luck...yet.
I also came across a slip-steamed install for MSDE for the new, free MS ADS
(?) server. It's an SUS system for deploying patches to Server Systems. It
had a build of 8.00.0880 but can't find a build description or why it was
inserted into this installation. MS also slip-streamed SP3a, of course, and
MS03-031, individually, like 880 wouldn't install without it.
Anthony Thomas
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uCtTUMcAFHA.3088@.TK2MSFTNGP10.phx.gbl...
> Yes, I found this out with .0859. The biggest reason I jumped on .0878,
it
> seemed more stable.
I've heard many similar complaints.

> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
I'm not sure how they're going to deal with this (other than slip the other
fixes in before release). BTW, can you share any articles that are 1000+?
The highest I can find is .993 (and not using the pitiful on-again off-again
search at support.microsoft.com).

2012年3月27日星期二

float point error

We are still seeing this error:
http://support.microsoft.com/default.aspx?scid=kb;en-us;818899
on the latest version of sqlserver2k :
select @.@.version
--
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows
NT 5.0 (Build 2195: Service Pack 4)
Does anyone know when MS will release an official patch. Suposedly, the
have a dll then can give you but nothing official. This is kindof a pretty
bad bug to leave open.> We are still seeing this error:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;818899
Well, did you follow the instructions in the article, by contacting
Microsoft product support and obtaining the .807 hotfix (which is later than
the "latest version" of .760)? There is no fee for the call or the hotfix
itself if you demonstrate to them that you are affected by the issue the
hotfix fixes.
Otherwise, you can try to find later patches (e.g. see
http://www.microsoft.com/technet/security/bulletin/ms03-031.mspx which
updates you to .818).
Barring those two actions, you will have to wait for SP4.
> This is kindof a pretty bad bug to leave open.
Well, that really depends on how many users it has affected, doesn't it?
--
http://www.aspfaq.com/
(Reverse address to reply.)|||As you know, SQL Server QFEs are cumulative. The fix described in this
article is Build 2000.00.0807. The latest publicly available hot fix is
Build .0878, which would include a fix for this error.
http://support.microsoft.com/?kbid=838166
Also know that SP4 is currently in Beta testing and will include builds up
to .0972.
Sincerely,
Anthony Thomas
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:OrJl5DOAFHA.824@.TK2MSFTNGP11.phx.gbl...
> We are still seeing this error:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;818899
Well, did you follow the instructions in the article, by contacting
Microsoft product support and obtaining the .807 hotfix (which is later than
the "latest version" of .760)? There is no fee for the call or the hotfix
itself if you demonstrate to them that you are affected by the issue the
hotfix fixes.
Otherwise, you can try to find later patches (e.g. see
http://www.microsoft.com/technet/security/bulletin/ms03-031.mspx which
updates you to .818).
Barring those two actions, you will have to wait for SP4.
> This is kindof a pretty bad bug to leave open.
Well, that really depends on how many users it has affected, doesn't it?
--
http://www.aspfaq.com/
(Reverse address to reply.)|||> As you know, SQL Server QFEs are cumulative.
That is true until .977. For example, to install .993 on .760, you first
need to get to the .977 hotfix installer -- .993 won't install on < .977 (it
will complain about missing prerequisites).
> The fix described in this
> article is Build 2000.00.0807. The latest publicly available hot fix is
> Build .0878, which would include a fix for this error.
However, it is not always the best to just install the latest. He may
prefer to go through PSS, demonstrate that .807 is his issue, and fix that.
.878 might bring about other problems that he doesn't have time to fully
test. Sure, it might be more convenient to get a patch that is publicly
available, but I don't jump to the conclusion that it is absolutely the best
answer.
> Also know that SP4 is currently in Beta testing and will include builds up
> to .0972.
And then the numbering scheme jumps significantly (SP4 beta is .2026, yet
there are several .973+ hotfixes already available).
I'm still curious why they chose to break at .977 to use the new hotfix
installer, breaking the chain of cumulative hotfixes. It would have been a
much more logical break, IMHO, to wait for SP4 -- introduce the new hotfix
installer at a stable, fully tested service pack... <shrug>
A|||Yes, I found this out with .0859. The biggest reason I jumped on .0878, it
seemed more stable.
I also noticed the large build increase on deploying the SP4 Beta (2026?)
However, from the fix list off of the beta description, it only includes
fixes through .0972 and I've seen KB listing all the way up to .1000 +. So,
I'm not sure how a Build including only fixes to the 972 level could be
labeled 2026. That's got me stumped. Not to mention that it bombs the
replication if you've already applied 878. I've got that thread running in
the Beta newsgroup.
Now, I wouldn't want to slam PSS, because they've been very helpful,
especially in crash circumstances; however, they have been known to push hot
fixes a little too eagerly as well. I figure once it has gone public, at
least, it has somewhat stabilized. But yes, I realize, that even SP level
code bases can introduce new bugs.
As always, thanks for your insight.
Sincerely,
Anthony Thomas
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23zfCiKbAFHA.3940@.TK2MSFTNGP09.phx.gbl...
> As you know, SQL Server QFEs are cumulative.
That is true until .977. For example, to install .993 on .760, you first
need to get to the .977 hotfix installer -- .993 won't install on < .977 (it
will complain about missing prerequisites).
> The fix described in this
> article is Build 2000.00.0807. The latest publicly available hot fix is
> Build .0878, which would include a fix for this error.
However, it is not always the best to just install the latest. He may
prefer to go through PSS, demonstrate that .807 is his issue, and fix that.
.878 might bring about other problems that he doesn't have time to fully
test. Sure, it might be more convenient to get a patch that is publicly
available, but I don't jump to the conclusion that it is absolutely the best
answer.
> Also know that SP4 is currently in Beta testing and will include builds up
> to .0972.
And then the numbering scheme jumps significantly (SP4 beta is .2026, yet
there are several .973+ hotfixes already available).
I'm still curious why they chose to break at .977 to use the new hotfix
installer, breaking the chain of cumulative hotfixes. It would have been a
much more logical break, IMHO, to wait for SP4 -- introduce the new hotfix
installer at a stable, fully tested service pack... <shrug>
A|||> Yes, I found this out with .0859. The biggest reason I jumped on .0878,
it
> seemed more stable.
I've heard many similar complaints.
> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
I'm not sure how they're going to deal with this (other than slip the other
fixes in before release). BTW, can you share any articles that are 1000+?
The highest I can find is .993 (and not using the pitiful on-again off-again
search at support.microsoft.com).|||> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
So,
> I'm not sure how a Build including only fixes to the 972 level could be
> labeled 2026. That's got me stumped.
My guess is that the hotfixes that have been pushed since December 9th (when
2026 was forged) have been worked into both branches, and will be included
in SP4 when it goes live... what that means for the beta process, I'm not
sure... clearly we can't be testing everything right up to the point of
release, and we're already using a build that's behind on at least 6 unique
hotfixes so far.
A|||Yea, I agree; they have to cut the beta release off at some point. I've
asked about the build number with no response though. I think it was a goof
but until I hear otherwise, we'll have to take it as they put it.
Anthony Thomas
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23c8UxPcAFHA.3264@.TK2MSFTNGP12.phx.gbl...
> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
So,
> I'm not sure how a Build including only fixes to the 972 level could be
> labeled 2026. That's got me stumped.
My guess is that the hotfixes that have been pushed since December 9th (when
2026 was forged) have been worked into both branches, and will be included
in SP4 when it goes live... what that means for the beta process, I'm not
sure... clearly we can't be testing everything right up to the point of
release, and we're already using a build that's behind on at least 6 unique
hotfixes so far.
A|||Yea, that's why I said .1000 +, I know I came across one article that listed
a .1193 or something like that and have been searching ever since but no
luck...yet.
I also came across a slip-steamed install for MSDE for the new, free MS ADS
(?) server. It's an SUS system for deploying patches to Server Systems. It
had a build of 8.00.0880 but can't find a build description or why it was
inserted into this installation. MS also slip-streamed SP3a, of course, and
MS03-031, individually, like 880 wouldn't install without it.
Anthony Thomas
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uCtTUMcAFHA.3088@.TK2MSFTNGP10.phx.gbl...
> Yes, I found this out with .0859. The biggest reason I jumped on .0878,
it
> seemed more stable.
I've heard many similar complaints.
> I also noticed the large build increase on deploying the SP4 Beta (2026?)
> However, from the fix list off of the beta description, it only includes
> fixes through .0972 and I've seen KB listing all the way up to .1000 +.
I'm not sure how they're going to deal with this (other than slip the other
fixes in before release). BTW, can you share any articles that are 1000+?
The highest I can find is .993 (and not using the pitiful on-again off-again
search at support.microsoft.com).

Float or Int

Does it make a difference if I use the Float or Int data type for a field such as ReceiptNumber or CheckNumber?

Thanks for any thoughts,It absolutely makes a difference -- use an int. Floating-point columns are used for scientific calculations and store floating-point numbers.

And actually, depending on how those columns are being generated and what their purpose is, I feel that varchar might be a better choice. To me, numeric data types are only appropriate for primary keys and for columns where some sort of math is going to happen.

Terri|||Required more memory too..

KP|||Is there a way that I can globally change the float to int in all of the tables in a DB? and is there an example of this some where?

Thank you,|||Well, you can find out where you have used the float data type in your database by issuing this:

SELECT * FROM information_schema.columns WHERE data_type = 'float'

You could write some script that selects this information into a cursor and then you could scroll through the cursor putting together dynamic SQL statements to execute that would do an ALTER TABLE and change the data type. Whether or not this would be worth the trouble is dependent upon how many occurrences you have.

Terri|||Terri,

Thank you very much!sql