From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Emi Lu <emilu(at)encs(dot)concordia(dot)ca> |
Cc: | pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: [SQL] Update value to "the first character is capital and the rest is small" |
Date: | 2006-03-13 22:36:04 |
Message-ID: | 20060313223604.GF18322@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Emi Lu | 2006-03-13 22:37:36 | Re: Update value to "the first character is capital and |
Previous Message | Emi Lu | 2006-03-13 22:31:28 | Update value to "the first character is capital and the rest is small" |
From | Date | Subject | |
---|---|---|---|
Next Message | Emi Lu | 2006-03-13 22:37:36 | Re: Update value to "the first character is capital and |
Previous Message | Emi Lu | 2006-03-13 22:31:28 | Update value to "the first character is capital and the rest is small" |