Subject Re: [IBO] Case-insensitive sorting
Author Svein Erling Tysvaer
As long as the result set is small, this solution works nice (and you
should always try to get small result sets). But expression indexes is
something new with Firebird 2 (I think), that certainly isn't possible
with Firebird 1.5. Hence, you cannot use any index with UPPER.

That's why I think IBO's facility with ColumnAttribute NOCASE and a name
for an uppercase equivalent of the field in question often is the best
solution. Adding a before insert trigger that populates this field
whenever you insert or update is very simple and with marginally more
work than the OrderingItems suggested below, you get the possibility for
indexed searching (and combining this with OrderingItems is a good idea).


Antti Kurenniemi wrote:
> ----- Original Message -----
> From: "mspencewasunavailable" <firebird@...>
> To: <>
> Sent: Wednesday, September 13, 2006 5:27 PM
> Subject: Re: [IBO] Case-insensitive sorting
>> Wow. OrderingItems, OrderingLinks. I have to admit, I had no
>> idea those were available.
>> <"reading help file noises" here>
>> Cool!
> [snipped some]
>> with these OrderingItems:
>> lname=UPPER(lastname);UPPER(lastname) desc
>> fname=UPPER(firstname);UPPER(firstname) desc
> Thanks, Michael - for some reason I just couldn't get that to work but now
> it does and everything, just everything is soooo great!
>> Haven't tried incremental search, but that would
>> mean I'd have to go research the controls needed
>> and I don't have time just now <g>.
> FYI: I'm using the LocateEdit, and it works like a champ - just set the
> datasource and that's about all there is to it, it's just beautiful.
> Antti Kurenniemi