Subject Re: [IBO] Case-insensitive sorting
Author mspencewasunavailable
--- In IBObjects@yahoogroups.com, "Antti Kurenniemi" <Antti@...>
wrote:
>
> ----- Original Message -----
> From: "mspencewasunavailable" <firebird@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Tuesday, September 12, 2006 2:13 AM
> Subject: Re: [IBO] Case-insensitive sorting
>
>
> > Adding ORDER BY UPPER(<fieldname>) to the TIB_QUERY works
> > fine for me when used with a grid. Is there some reason you
can't do
> > this? (Don't know whether this'd work with a search, but I'd
bet there's
> > a way.)
>
> I'm using the built-in sorting of IBO, with OrderingItems and
OrderingLinks,
> and I couldn't find a way to add the "UPPER" in there anywhere.
Are you
> setting the query manually when the sorting changes?
>
>
> Antti Kurenniemi
>

Wow. OrderingItems, OrderingLinks. I have to admit, I had no
idea those were available.

<"reading help file noises" here>

Cool!

<fumbling noises while trying them out.>


I created this table:

CREATE TABLE AAA(
LASTNAME Varchar(30) NOT NULL,
FIRSTNAME Varchar(30),
CITY Varchar(30),
COUNTRYCODE Varchar(2),
CONSTRAINT AAA_PK PRIMARY KEY (LASTNAME)
);

And used this data:
INSERT INTO AAA (LASTNAME, FIRSTNAME, CITY, COUNTRYCODE)
VALUES ('smithers', 'john', 'topeka', 'us');
INSERT INTO AAA (LASTNAME, FIRSTNAME, CITY, COUNTRYCODE)
VALUES ('allen', 'william', 'nashville', 'US');
INSERT INTO AAA (LASTNAME, FIRSTNAME, CITY, COUNTRYCODE)
VALUES ('SMITH', 'TED', 'BOSTON', 'US');
INSERT INTO AAA (LASTNAME, FIRSTNAME, CITY, COUNTRYCODE)
VALUES ('ALDRIDGE', 'ARNOLD', 'BOISE', 'US');

And this query:
SELECT * from AAA;

with these OrderingItems:

lname=UPPER(lastname);UPPER(lastname) desc
fname=UPPER(firstname);UPPER(firstname) desc

and these OrderingLinks:

LASTNAME=1
FIRSTNAME=2

and set OrderingItemNo to 0. Grid shows in natural order and
the arrows at the top of the columns do the right thing.

So that seems to work. This is really good stuff.

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>.


Michael D. Spence
Mockingbird Data Systems, Inc.