pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
TRANSLATE()
2+ messages / 2 participants
[nested] [flat]

* TRANSLATE()
@ 1999-05-08 16:58  Henrik Steffen <henrik@steffen.stade.net>
  0 siblings, 1 reply; 2+ messages in thread

From: Henrik Steffen @ 1999-05-08 16:58 UTC (permalink / raw)
  To: 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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [SQL] TRANSLATE()
@ 1999-05-09 14:39  Herouth Maoz <herouth@oumail.openu.ac.il>
  parent: Henrik Steffen <henrik@steffen.stade.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Herouth Maoz @ 1999-05-09 14:39 UTC (permalink / raw)
  To: Henrik Steffen <henrik@steffen.stade.net>; +Cc: pgsql-sql

At 19:58 +0300 on 08/05/1999, Henrik Steffen wrote:

> 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

Just a minute, did you set the proper locale in your environment? Postgres
is supposed to be locale-friendly.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-05-09 14:39 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-05-08 16:58 TRANSLATE() Henrik Steffen <henrik@steffen.stade.net>
1999-05-09 14:39 ` Herouth Maoz <herouth@oumail.openu.ac.il>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox