On Thu, Feb 12, 2004 at 12:46:27 -0600,
Javier Carlos <javier@evaloportunidades.insp.mx> wrote:
> ============================================================================
> bd_temporal=> SELECT * FROM tbl_temp WHERE var < 0.20;
> var
> ------
> 0.1
> 0.11
> (2 rows)
> bd_temporal=> SELECT * FROM tbl_temp WHERE var = 0.11;
> var
> -----
> (0 rows)
> bd_temporal=> SELECT * FROM tbl_temp WHERE var = '0.11';
> var
> ------
> 0.11
> (1 row)
>
>
> If you know how this problem might be fixed, list the solution below:
If you want exact fractional numbers you should be using numeric, not float.
The problems you are seeing has to do with single precision and double
precision versions of .11 not being equal.