473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Inconsistent results for SELECT SUM(<<real field>>) ...

My platform is SQL Server 2005. One of the tables of my db has
28589928 rows and one of the fields is real. When I backup and restore
this database to another server (using the SQL Server internal tool)
and do a SELECT SUM(<<field name>>) from <<table name>>, the results
from these two servers are slightly different. I don't understand the
reason because these databases are static and they should be exactly
the same.

Then when I tried to run the above select on the same server a few
times in a row, I also had inconsistent results (and no user is
accessing the database). This doesn't make any sense to me...
Sep 26 '08 #1
1 3271
The FLOAT/REAL data type is approximate, and as such not all values in
the data type range can be represented exactly.

Interesting readings on the topic:

http://blogs.msdn.com/khen1234/archi...13/417153.aspx
http://sqlblog.com/blogs/hugo_kornel...all-exact.aspx
http://msdn.microsoft.com/en-us/library/ms173773.aspx

--
Plamen Ratchev
http://www.SQLStudio.com
Sep 26 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Burton Figg | last post by:
I have a SELECT statement which holds a list of times (for adding appointments to a database): e.g. <select name="time" id="time" size="3" multiple> <option value="00:00">00:00</option>...
0
by: Arne Schirmacher | last post by:
I want to display a MySQL database field that can contain HTML markup. If I use <esql:get-string> then I get all of the database field, but all tags are escaped which is not what I want. If I use...
1
by: Robert Kattke | last post by:
I'm designing a site for local music and entertertainment and have a few ?s that need to be cleared up. Currently, I'm working on the Club part and have a Contact Person form, and a Club form. ...
1
by: Matthias Wege | last post by:
hello, is there any chance to shape borders of a <select>-field? i tried select { background-color:#eee; border:1px solid red; }
1
by: trinity | last post by:
Hello all, First, I am grateful for this forum and all comments that will be posted. I am designing a database that compiles data from sewage treatment plants. Mostly the data is numeric. ...
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have...
1
by: ghadley_00 | last post by:
Hi, I have a php form that encodes the responses to various <Select> field drop down menus as numbers (e.g. 0 to 50), and then posts the data to a MySQL table. I am trying to implement a form...
19
by: VK | last post by:
http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/ b495b4898808fde0> is more than one month old - this may pose problem for posting over some news servers. This is why I'm...
1
by: ximian | last post by:
(IE6) When <select> tag contains many elements (eg. 50) it cannot display them at once. IE6 displays 30 elements at most and shows the vertical scrollbar. My question is: is it possible to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.