🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #451

SUM() problem!

#451
From: Atanas Kulishev
Date: Wed, 21 Nov 2007 09:04
19 lines
1550 bytes
Hello,
I have problem with SUM() function in Firebird 1.5.4

Please help!
Total rows in table is 1 000 000, sumed rows is: 3934


SELECT SUM( N_ST ) FROM T_NALI WHERE C_NOMER= 'DAAD'
Result>>> 19627960,11 - that is ok

SELECT SUM( N_ST )-SUM( N_ST ) FROM T_NALI WHERE C_NOMER= 'DAAD'
Result>>> 0 - that is ok

Look this now:
SELECT SUM( N_ST )-19627960.11 FROM T_NALI WHERE C_NOMER= 'DAAD'
Result>>> 1,4901161193847 - ?????? what's happen

SELECT SUM( N_ST )-19627960.10 FROM T_NALI WHERE C_NOMER= 'DAAD'
Result>>> 0,0100000128149 - ??????
Technical Details
Message-ID: <4743f4e8@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,2f2cb75710643c,start
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Atanas Kulishev" <coolman_kk@mail.bg>
Newsgroups: borland.public.interbase.sql
Subject: SUM() problem!
Date: Wed, 21 Nov 2007 11:04:54 +0200
Lines: 21
MIME-Version: 1.0
Content-Type: text/plain;
 format=flowed;
 charset="iso-8859-1";
 reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545
NNTP-Posting-Host: 87.126.2.104
Message-ID: <4743f4e8@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1195635944 87.126.2.104 (21 Nov 2007 01:05:44 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail