TRANSLATE()

From: Henrik Steffen <henrik(at)steffen(dot)stade(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: TRANSLATE()
Date: 1999-05-08 16:58:43
Message-ID: 37346D43.419B4AFA@steffen.stade.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Wayne Piekarski 1999-05-09 08:08:42 Re: [HACKERS] Re: INSERT/UPDATE waiting (another example)
Previous Message Tom Lane 1999-05-08 14:49:18 Re: [SQL] Functions for arrays !!!!