Re: Using the REPLACE command to replace all vowels

Поиск
Список
Период
Сортировка
От Tony Wasson
Тема Re: Using the REPLACE command to replace all vowels
Дата
Msg-id 6d8daee30605021654u1aadcdadnc6e96a4958b6498f@mail.gmail.com
обсуждение исходный текст
Ответ на Using the REPLACE command to replace all vowels  ("EbGrooveCb" <cbaumann@cmsgrp.com>)
Список pgsql-general
On 1 May 2006 13:16:15 -0700, EbGrooveCb <cbaumann@cmsgrp.com> wrote:
> Is there a way to make seperate replacements in 1 field in one command
> in SQL?
>
> I need to remove all vowels (a,e,i,o,u) in a field. How would I go
> about that?
>

You can do all the replacements in a single SQL statement by nesting
the REPLACE statements. This will just strip those letters.

SELECT
  REPLACE(
  REPLACE(
  REPLACE(
  REPLACE(
  REPLACE(
    'Your string or field here.'
  ,'a','')
  ,'e','')
  ,'i','')
  ,'o','')
  ,'u','')
;

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: age(datfrozenxid) negative for template0. Is this normal?
Следующее
От: Fernan Aguero
Дата:
Сообщение: Re: For vim users: Syntax highlighting for PostgreSQL