views:

88

answers:

2

I want to order a resultset. The columns which i want to use for ordering contain german umlauts like ö, ü and ä. I want column data with these sortet together with normal letters. Example:

At it the Moment, the resultset is ordered like this: ABCOXYZÖ

I want it to be ordered like this: ABCOÖXYZ

Thanks

+1  A: 

DB2 9 onwards has a COLLATION_KEY function for specifying sort order in the ORDER BY clauses:

ORDER BY COLLATION_KEY(field,...)
Will
Forgot to mention: I'm using a DB2 i5/OS V5R4... Tried COLLATION_KEY, but it doesn't work....
A: 

Look into changing the Sort Sequence before you run your SQL - it's the SRTSEQ parameter on the STRSQL, RUNSQLSTM or CHGJOB commands.

Paul Morgan