Subject | RE: [firebird-support] Re: Case insensitive collations |
---|---|
Author | Sean Cross |
Post date | 2006-03-27T22:36:54Z |
> -----Original Message-----The first one is a bit of a nasty hack. The second is an improvement.
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] On Behalf Of Adam
> Sent: 27 March 2006 11:01 p.m.
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] Re: Case insensitive collations
>
> > Are there any case insensitive collations in firebird 1.5 or 2?
> > I am wanting to do case insensitive searches. While I can do this
> > with Upper, it doesn't use any indexes so it's not very efficient.
>
> With Firebird 1.5 you can create a surrogate 'upper' field
> and use before insert or update triggers to maintain it. You
> can then index this surrogate field and do a 'case
> insensitive' search against it.
> Not ideal but workable.
>
> With Firebird 2, you can use an expression index. For
> example, you can create an index on Upper(Field1) so that the
> following query will use that index
>
>
> select *
> from table1
> where Upper(field1) = 'HELLO WORLD'
>
> Adam
>
>
However I think a case insesitive collation would be a better answer. Is
there a reason why this has never been added. There seems to be a fair
demand for it.
Regards
Sean
---------------------------------------
Sean Cross
mailto:sean@...
Pics Print - The photo printing solution for Windows.
http://www.picsprint.com
Rental Property Manager: Rental management made easy
http://www.sourceitsoftware.com