Subject Re: [firebird-support] Using computed fields in indexes
Author Alexandre Benson Smith
rogervellacott wrote:
> Using Computed fields in triggers
>
>
> I want to use the FB2 feature alowing use of expressions in indexes,
> so
> that all my indexes are upper case.
>
> I can do this for single-field indexes, e.g.
>
> CREATE INDEX IX01 ON TABLE1 COMPUTED BY (UPPER(FIELD1));
>
> but I can't find the right syntax for an index with two or more
> fields.
>
> If I use ||, presumably the trailing spaces on the first field will be
> trimmed, and results will be incorrect. e.g. AAA,BBB should come
> before AAAA, BBB, but AAABBB will come after AAAABBB.
>
> What is the correct syntax for this?
>
> Roger Vellacott
> Passfield Data Systems Ltd
>

I would take another approach.

I would use a case insensitive collation. I use collation PT_BR on
charset ISO8859_1.

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br