TRANSLATE() - Mailing list pgsql-sql

From Henrik Steffen
Subject TRANSLATE()
Date
Msg-id 37346D43.419B4AFA@steffen.stade.net
Whole thread Raw
Responses Re: [SQL] TRANSLATE()
List pgsql-sql
Hello all,

I wonder how I can translate some German special characters for an ORDER
BY clause.

say, you got some German words like these:

Abend
Ära
Opa
Österreich
Übergabe
Ufer

and want to order them in the way above, you will need to translate 'Ä'
into 'Ae', 'Ö' into 'Oe' and 'Ü' into 'Ue' to order them correctly.

I thought of something like this:
SELECT myword FROM words ORDER BY TRANSLATE(myword,'Ä','Ae');

But now I only got one of the cases. How can I combine all the three
translations?

Any help appreciated!


Greetings

Henrik Steffen
http://www.AH-Tuning.de




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] Functions for arrays !!!!
Next
From: Wayne Piekarski
Date:
Subject: Re: [HACKERS] Re: INSERT/UPDATE waiting (another example)