try this query

SELECT
bytes,
bytes_priv,
bytes_bus,
hits,
hits_priv,
hits_bus,
bytes - ( bytes_priv + bytes_bus ),
hits - (hits_priv + hits_bus)
FROM url_cat_copy
WHERE
(bytes<>round(bytes_priv+bytes_bus,0))
or
(hits<>round(hits_priv + hits_bus,0))

i think its got something to do with the decimal type..
try googling or search in the manual book
i've red somewhere, that a decimal number in computer never as exact
as what they have meant..

HTH
Leo

On Tue, 24 Aug 2004 08:41:47 +0200, Martin Rytz <[EMAIL PROTECTED]> wrote:
> Good Morning Community!
> 
> I have a problem with 4.1.3 that I not had with 4.0.20.
> 
> Here is my table:
> 
> CREATE TABLE url_cat_copy (
>   id int(11) NOT NULL auto_increment,
>   url varchar(100) default NULL,
>   domain varchar(100) default NULL,
>   bytes bigint(20) default NULL,
>   hits bigint(20) default NULL,
>   bytes_priv decimal(20,2) default NULL,
>   hits_priv decimal(20,2) default NULL,
>   bytes_bus decimal(20,2) default NULL,
>   hits_bus decimal(20,2) default NULL,
>   cat1 varchar(100) default NULL,
>   cat2 varchar(100) default NULL,
>   cat3 varchar(100) default NULL,
>   PRIMARY KEY  (id)
> );
> 
> Here is a sample-data:
> 
> INSERT INTO url_cat_copy VALUES (272, '195.120.225.10', '195.120.225.10',
> 3040, 3, 2533.33, 2.50, 506.67, 0.50, 'Shopping', 'Religion',
> 'Music/Webradio');
> 
> Here ist the query:
> 
> SELECT  *
> FROM url_cat_copy
> WHERE bytes - ( bytes_priv + bytes_bus )  <> 0 OR hits - (hits_priv +
> hits_bus) <> 0;
> 
> The result from the query should be no record (empty recordset). With 4.0.20
> it was, with 4.1.3 it is not.
> 
> Can you reconstruct the problem on your 4.1.3 installation? Why has the
> result changed?
> How I must change the query, that the result is an empty recordset again?
> 
> Thank you in advance!
> Martin Rytz
> 
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to