Re: find and replace the string within a column

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: find and replace the string within a column
Дата
Msg-id 4C9C8CB4.3070205@postnewspapers.com.au
обсуждение исходный текст
Ответ на find and replace the string within a column  (Nicholas I <nicholas.domnic.i@gmail.com>)
Ответы Re: find and replace the string within a column
Список pgsql-sql
On 24/09/2010 5:15 PM, Nicholas I wrote:

> Example:
> table name person:
>
> name
> ------------------------------------
> Samuel (S/o Sebastin )
> -------------------------------------
>
> remove the word within the brackets.
> the output should be , Samuel.

Can't you just regexp_replace, matching \([^)]+\) (in other words "an 
open parenthisis, then a sequence of one or more of any character other 
than a close parenthesis, followed by a close parentheis) and replacing 
with an empty string ?

-- 
Craig Ringer

Tech-related writing at http://soapyfrogs.blogspot.com/


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

Предыдущее
От: "Oliveiros d'Azevedo Cristina"
Дата:
Сообщение: Re: identifying duplicates in table with redundancies
Следующее
От: Nicholas I
Дата:
Сообщение: pgdump with insert command help