Re: Substitute a Character

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: Substitute a Character
Дата
Msg-id 20060906170912.GA18152@KanotixBox
обсуждение исходный текст
Ответ на Substitute a Character  (Judith <jaltamirano@correolux.com.mx>)
Список pgsql-sql
Judith <jaltamirano@correolux.com.mx> schrieb:

>     Hello everybody!!       I have a field type text with folios like this: 
> A98526
> 
>     but I want to change de A for a 0 like this: 098526, exists a way to do 
> this in a query???

Perhaps something like this:

test=# select regexp_replace('A98526', '^.', '0');regexp_replace
----------------098526
(1 row)

http://www.postgresql.org/docs/8.1/interactive/functions-matching.html#FUNCTIONS-POSIX-REGEXP


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°


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

Предыдущее
От: Judith
Дата:
Сообщение: Substitute a Character
Следующее
От: Chris Mair
Дата:
Сообщение: Re: Substitute a Character