Subject Re: [IB-Architect] Syntax for case insensitive sort
Author Jim Starkey
At 06:35 PM 3/29/00 -0000, you wrote:
>From: "Kim Madsen" <kbm@...>
>Ehh.... break what???
>Its really not that difficult. You either compare with constants or
>with fields on left and right side of the operator.
>If you compare constant against a field, the constant ofcause must
>follow the rules of the field to be matched as TRUE.
>That ought to be simple logic.
>If the field is a UCASE field the constant should be converted to
>UCASE before comparison, if the field is NCASE, the constant should
>NOT be converted, but used as is and in the example shown result in

This is a very bad idea.

Values are (and should) be treated abstractly within an engine.
A string is a string is a string where it is a constant, a field
value, a concatenation of two strings, or the result of a UDF.
You can't go making up special case rules for things on the right
side or things on the left side or character strings on the left
side. That's not the way the logic works and it's not the way
Interbase works, and it's not the way Interbase should work.

To avoid adding a case insensitive equality operator you are
inventing all sorts of inconsistent ESP that would difficult
to document and worse to implement. Just imagine the nightmare
in the code that distributes equalities across join terms in
the poor optimizer.

Jim Starkey