Re: Update value to "the first character is capital and

From: John Sidney-Woollett <johnsw(at)wardbrook(dot)com>
To: emilu(at)encs(dot)concordia(dot)ca
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Update value to "the first character is capital and
Date: 2006-03-14 07:56:31
Message-ID: 4416772F.1050603@wardbrook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message r irussel 2006-03-14 07:58:40 Urgent !!! Please Help Me
Previous Message Nick Johnson 2006-03-14 06:45:47 Dynamic function execution?

Browse pgsql-sql by date

  From Date Subject
Next Message Jean-Paul Argudo 2006-03-14 11:45:37 Re: connectby documentation
Previous Message Aarni Ruuhimäki 2006-03-14 07:19:49 Copying a row within table