From: Alvaro Herrera <alvherre@commandprompt.com>
To: Emi Lu <emilu@encs.concordia.ca>
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Update value to "the first character is capital and the rest is small"
Date: Mon, 13 Mar 2006 18:36:04 -0400
Message-ID: <20060313223604.GF18322@surnet.cl> (raw)
In-Reply-To: <4415F2C0.3040707@encs.concordia.ca>
References: <4415F2C0.3040707@encs.concordia.ca>
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
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: alvherre@commandprompt.com, emilu@encs.concordia.ca, pgsql-general@postgresql.org
Subject: Re: [SQL] Update value to "the first character is capital and the rest is small"
In-Reply-To: <20060313223604.GF18322@surnet.cl>
* 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