Subject RE: [ib-support] Case sensitivity drives me crazy
Author Martijn Tonies
Hi,

the best (and fastest) way to do this, is to keep a shadow column on the
columns you want to search.

For example:

CUSTOMERS
(
NAME varchar(30),
UP_NAME varchar(30)
)


triggers, before update and before insert:

BEGIN
new.UP_NAME = UPPER(NAME);
END


Then, search like:

SELECT * FROM CUSTOMERS
WHERE UP_NAME = 'MA%'


>What is the best way to do fast search by first name or last name etc?
>
>Interbase or Firebird does not use index if you uppercase(firstName).
>
>This is driving me crazy.

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com


[Non-text portions of this message have been removed]