Hi,
Thank you all for your comments.
Finally, I think I will simply use the data type NUMERIC instead of REAL
in all my columns !!
This type is more appropriate to store prices !
Philippe Ferreira.
Try this:
SELECT 13.95 = 13.95::real;
It should yield false, because the first number cons
On 6 feb 2006, at 19.32, Philippe Ferreira wrote:
I've just realized that this way, it works very fine :
SELECT * FROM mytable WHERE myreal = 13.95::real;
But I still don't understand very well why I need the explicit
conversion (::real) ...
Try this:
SELECT 13.95 = 13.95::real;
It sh
On Feb 6, 2006, at 10:21 AM, Philippe Ferreira wrote:
Comparing two floating point numbers for equality seldom works
the way you want it to.
Without seeing the exact data you have it's hard to say for sure
(as there
may be some other issue with what you're doing) but I wouldn't expect
th
Hi,
I've just realized that this way, it works very fine :
SELECT * FROM mytable WHERE myreal = 13.95::real;
But I still don't understand very well why I need the explicit
conversion (::real) ...
Philippe Ferreira.
---(end of broadcast)---
T
Comparing two floating point numbers for equality seldom works
the way you want it to.
Without seeing the exact data you have it's hard to say for sure (as
there
may be some other issue with what you're doing) but I wouldn't expect
this to work with data from arbitrary sources.
Try
SELEC
On Feb 5, 2006, at 2:30 PM, Philippe Ferreira wrote:
Hi,
I've never noticed before, but I don't manage to do a "SELECT" with
conditions on REAL columns !!
For example, the following command always returns 0 row, even if
rows with myreal=10.5 do exist :
SELECT * FROM mytable WHERE my
On Feb 6, 2006, at 7:30 , Philippe Ferreira wrote:
For example, the following command always returns 0 row, even if
rows with myreal=10.5 do exist :
SELECT * FROM mytable WHERE myreal=10.5;
Where am I wrong ?!
Without seeing a more complete example, it's hard to say. It works
for me
Hi,
I've never noticed before, but I don't manage to do a "SELECT" with
conditions on REAL columns !!
For example, the following command always returns 0 row, even if rows
with myreal=10.5 do exist :
SELECT * FROM mytable WHERE myreal=10.5;
Where am I wrong ?!
Thank you in advance,
Phi