We are running v4.0.12.

Consider the following:

mysql> SELECT MAX(assets) as assets
    -> FROM do_deductibles
    -> WHERE currency = 'usd';
+--------+
| assets |
+--------+
|   NULL |
+--------+
1 row in set (0.00 sec)

mysql> SELECT MAX(assets) as assets
    -> FROM do_deductibles
    -> WHERE currency = 'usd' AND 
    -> assets IS NOT NULL;
+----------+
| assets   |
+----------+
| 10000000 |
+----------+
1 row in set (0.00 sec)

mysql> SELECT MAX(assets) as assets
    -> FROM do_deductibles
    -> WHERE currency = 'usd';
+----------+
| assets   |
+----------+
| 10000000 |
+----------+
1 row in set (0.00 sec)

What's going on with the MAX() function?  Why did it return NULL
in the first query above.  There were no adding/deleting data between
the above queries and yet MySQL didn't pull the MAX from the table
until I added the "AND assets IS NOT NULL" to the query.  And yet
after I ran that query, attempting to run the first query yields the proper
results.
Is this a bug with MySQL?

thnx,
Chris


mysql,query,blah



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

Reply via email to