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

Поиск
Список
Период
Сортировка
От John Sidney-Woollett
Тема Re: Update value to "the first character is capital and
Дата
Msg-id 4416772F.1050603@wardbrook.com
обсуждение исходный текст
Ответ на Update value to "the first character is capital and the rest is small"  (Emi Lu <emilu@encs.concordia.ca>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [pgsql-advocacy] Wisconsin Circuit Court Access (WCCA) on
Следующее
От: "Paul Mackay"
Дата:
Сообщение: Utility of GRANT EXECUTE