Re: [SQL] Update value to "the first character is capital and the rest is small" - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: [SQL] Update value to "the first character is capital and the rest is small"
Date
Msg-id 20060313223604.GF18322@surnet.cl
Whole thread Raw
In response to Update value to "the first character is capital and the rest is small"  (Emi Lu <emilu@encs.concordia.ca>)
List pgsql-general
Emi Lu wrote:
> Hello all,
>
> Does anyone have available plpgsql codes to update all capital letters
> in a column to "the first character is capital and the rest is small" ?

I don't know about plpgsql codes, but there is a function initcap() that
you can use for that.

alvherre=# select initcap('GU & WEI. NAN (CE SHI) & TOMMORROW');
              initcap
------------------------------------
 Gu & Wei. Nan (Ce Shi) & Tommorrow
(1 row)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-general by date:

Previous
From: Emi Lu
Date:
Subject: Update value to "the first character is capital and the rest is small"
Next
From: Emi Lu
Date:
Subject: Re: Update value to "the first character is capital and