Search Postgresql Archives

Re: [SQL] Update value to "the first character is capital and the rest is small"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux