Make your own free website on Tripod.com

InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: ORDER BY CollationKey?


Dick

Don't know if this is exactly what you asked for, but this extract from 
a ScriptTool script illustrates how to alter the collation sequence 
using a string function

drop table test;
create table test (id int, name char(40) );
insert into test values (1, "Zog");
insert into test values (2, "alan");
q select * from test order by name;
q select lower(name),test.* from test order by 1;

As you can write your own functions, you can effectively have any 
collation sequence that you like.

Regards

Pete

----- Original Message -----
From: Dick Repasky <drepasky@bio.indiana.edu>
Date: Sunday, December 10, 2000 2:13 am
Subject: InstantDB: ORDER BY CollationKey?

> 
> Hello, all,
> 
> This is my first post.
> 
> I'd like to use the ORDER clause on strings and have them be ordered
> as they would be by a java Collator.  (What counts is that lower and
> upper cases be honored but grouped together by first letter rather 
> thanappearing as all upper case instances of all letters followed 
> by all
> lower case instances of all letters.  I'm also interested in 
> supportingmultiple languages.)  I understand that this is not 
> possible in instantdb
> by default.
> 
> The question is: can I obtain the desired effect by using a table 
> columnthat contains CollationKeys and use the ORDER clause on the 
> key column?
> The idea is to use the toByteArray() method of CollationKey to get a
> plain form of the keys and then put the bytes into a column of type
> BINARY in the table and use ORDER on that column.  Presto?
> 
> Thanks,
> 
> Dick
> -------------------------------------------------------------------
> ----------
> To unsubscribe from this mailing list, send email to 
> majordomo@enhydra.orgwith the text "unsubscribe instantdb" in the 
> body of the email.
> If you have other questions regarding this mailing list, send 
> email to
> the list admin at owner-instantdb@enhydra.org.
> 

-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.