Subject Re: Strange query results, based on where clause
Author rogervellacott
In principle, I agree. However, there are probably lots of apps out
there that depend on being able to compare strings to numbers. If
you make it throw an error, it will cost developers a lot of money,
or ensure they do not move to Firebird.

--- In ib-support@y..., "Woody" <woody.tmw@i...> wrote:
> From: "rogervellacott" <rvellacott@p...>
> > Perhaps the engine can detect whether we are comparing a number
to a
> > string, and if so, rather than raise an error, just suppress any
> > of an index for those fields.
> >
> This just circumvents the real problem which, IMO, is using the
wrong data
> types for comparison. There is no guarantee that a string field
holds a
> valid number. It is wrong, therefore, IMO, to force the engine to
look at
> them the same. When programming, you can't compare a number to a
> without converting one of them to the other's data type so it
doesn't make
> sense to me that this "logic" is glossed over in the background when
> performing queries. Although, it does seem convenient at times for
this to
> happen, I have seen too many times in the past where convenience
> future bugs to appear. I tend to think that this "bug" should be
fixed to
> always provide an error if trying to compare two totally different
> types.
> Woody (TMW)