I'm using my own custom datatype (DECIMAL as a packed BCD fixed-point
number) and I have the following situation:
> SELECT PART, MFTR, CURR_PLM_DC1 FROM INVNSC WHERE COMM_CURR = "EUP" AND CURR_PLM_DC1
> <= 0.0;
+----------+------+--------------+
| PART | MFTR | CURR_PLM_DC1 |
+----------+------+--------------+
| 1.5KE15A | STM | 0.1600 |
+----------+------+--------------+
1 row in set
> SELECT PART, MFTR, CURR_PLM_DC1 FROM INVNSC WHERE COMM_CURR = "EUP" HAVING
> CURR_PLM_DC1 <= 0.0;
Empty set
The above two statements return different results. Significantly, the
first one returns erronious results!
So - apart from ploughing through the code to see how HAVING differs
from WHERE, I was wondering what is the difference between the
comparison done by the two methods and why would it cause it to yield
different results.
I'm pretty sure that there is something wrong in my own custom decimal
class - just a helpful pointer would be appreciated.
--
ANTONY T CURTIS Tel: +44 (1635) 36222
Abacus Polar Holdings Ltd Fax: +44 (1635) 38670
> Be free and open and breezy! Enjoy! Things won't get any better so
> get used to it.
| Thread |
|---|
| • Custom data types | Antony T Curtis | 6 Apr |
| • Custom data types | Michael Widenius | 6 Apr |