From: John Sidney-Woollett <johnsw@wardbrook.com>
To: emilu@encs.concordia.ca
Cc: pgsql-general@postgresql.org
Subject: Re: Update value to "the first character is capital and
Date: Tue, 14 Mar 2006 07:56:31 +0000
Message-ID: <4416772F.1050603@wardbrook.com> (raw)
In-Reply-To: <4415F2C0.3040707@encs.concordia.ca>
References: <4415F2C0.3040707@encs.concordia.ca>
Have you tried the initcap function?
select initcap('abcd efgh');
initcap
-----------
Abcd Efgh
John
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" ?
>
> For example, in tableA(id, description)
> 001, 'ZHANG ZHE XIN' =>
> 'Zhang Zhe Xin'
> 002, 'LIU, WEI-HUAI'
> => 'Liu, Wei-Huai'
> 003, 'GU & WEI. NAN (CE SHI) & TOMMORROW' => 'Gu & Wei. Nan (Ce
> Shi) & Tommorrow'
>
> Thanks a lot!
> Ying
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: johnsw@wardbrook.com, emilu@encs.concordia.ca, pgsql-general@postgresql.org
Subject: Re: Update value to "the first character is capital and
In-Reply-To: <4416772F.1050603@wardbrook.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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