DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old November 29th, 2006, 04:34 AM
phpweb phpweb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 251 phpweb User rank is Private First Class (20 - 50 Reputation Level)phpweb User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 3 Days 18 h 21 m
Reputation Power: 5
Cannot make sorting against Norwegian letters work. Help?

Okay..

I have created an UDF to be able to use a collation when sorting

I want to sort records that contain Norwegian letters.

Database is in UTF-8

If I do this:
select PAG_ID,PAG_NAME from pager where lower(PAG_NAME) like 'a%' order by ICU.SORTKEY(PAG_NAME, 'LNB')

(where LNB is the collation)

then the records are ordered like this:




If I do this:
select PAG_ID,PAG_NAME from pager where lower(PAG_NAME) like 'a%' order by ICU.SORTKEY(PAG_NAME, 'LNB_AS')
then the records are ordered like this:





The records should have been in this order:




This is the only database I have trouble getting this to work.

Does someone know how to make this work.
I do want to store the data in a UTF8 database though.

the default "Norwegian Bokmål" collation to use is
LNB

It is possible though to add some attributes to the LNB string
to change how to order the records....
So when I use LNB_AS it is different that default sort order.

I have played around with the attributes but without getting it to work.

If anyone know how to do this I would be happy to see an explanation here.
__________________
BongoBongo

Last edited by phpweb : November 30th, 2006 at 07:02 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > How do I sort according a given collation in DB2


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway