Home > Archive > PostgreSQL SQL > March 2006 > Re: [GENERAL] Update value to "the first character is capital and









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [GENERAL] Update value to "the first character is capital and
Emi Lu

2006-03-13, 8:24 pm

I got the answer from the docs. |initcap|(text)

thanks anyway,
Ying

> 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




---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com