Subject | Re: [firebird-support] Searching name in SELECT statment |
---|---|
Author | Helen Borrie |
Post date | 2004-10-04T23:00:57Z |
At 06:49 PM 4/10/2004 +0000, you wrote:
update triggers to populate it, e.g.
new.ProxyName = upper(Name);
Index the proxy column instead of the Name column.
./heLen
>Hi, AllIt can't use the index because UPPER(name) is an expression.
>
>I have the following SQL statment intend to search the company name
>beginning with a centain value, I have a index based on Name field.
>
>SELECT name, street, city, state, postalcode, country_id
>FROM clients
>WHERE UPPER(name) STARTING WITH :Value;
>
>The statment returns all correct records with the name starting with
>"H" or "h" (if the Value is "h"), but DOESN'T use the name index, so
>it is not good.
>What is the best way to to make the firebird database engine to pickStore a proxy search column of the same size as Name and write insert and
>the correct index (NAME) to do such kind of searching regardless if
>the searched fields are uppercase or lowercase.
update triggers to populate it, e.g.
new.ProxyName = upper(Name);
Index the proxy column instead of the Name column.
./heLen