Subject | Re: [IBO] sort order in firebird |
---|---|
Author | ming |
Post date | 2012-07-29T11:44:47Z |
thanks for replay,
i change the vcl with tib_locateedit solved.
before i use the tib_incsearch.
i change the vcl with tib_locateedit solved.
before i use the tib_incsearch.
--- In IBObjects@yahoogroups.com, Svein Erling Tysvær <svein.erling.tysvaer@...> wrote:
>
> >hi all
> >
> >i have a problem when sorting tib_query
> >example:
> >
> >data in column :
> >AA
> >Aa
> >aA
> >AA
> >BB
> >
> >ib_connection.charset=utf8,
> >result for above table, like below:
> >AA
> >Aa
> >BB
> >aA
> >aa
> >
> >and should order like this:
> >aa
> >aA
> >Aa
> >AA
> >BB
> >
> >the question how to fix sort order with lowercase priority ?
>
> That is actually an unusual requirement (the usual way to deal with this is to either use a case insensitive or case sensitive collation, not a "partially case sensitive" collation) and I doubt Firebird has any inbuilt support for it. I guess the correct way to solve your problem, would be to create your own collation - though I've no idea how to do that and that is more appropriate to ask at firebird-support than here (Stefan Heymann knows a lot about the subject, see www.destructor.de).
>
> IBO do support the concept of an upper case equivalent column. So a pragmatic solution might be to have a BI/BU-trigger that sets such a column to the following values (adding u to each uppercase letter and l to each lowercase, you figure out the trigger yourself):
>
> MyColumn MyUpperCaseEquivalent
> AA AuAu
> Aa AuAl
> aA AlAu
> aa AlAl
> BB BuBu
>
> HTH,
> Set
>