Re: Substitute a Character

Поиск
Список
Период
Сортировка
От Kaloyan Iliev
Тема Re: Substitute a Character
Дата
Msg-id 44FFE05C.2010109@faith.digsys.bg
обсуждение исходный текст
Ответ на Substitute a Character  (Judith <jaltamirano@correolux.com.mx>)
Список pgsql-sql
Hi,

Try:
UPDATE foe SET field = regexp_replace(field, '^.', '0');
OR
UPDATE foe SET field = regexp_replace(field, 'A', '0');

This will replace in table "foe" in the column "field" 'A' with '0';

Regards, Kaloyan Iliev

Judith wrote:

>    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???
>
>    Thanks in advanced!!!
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>



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

Предыдущее
От: Kaloyan Iliev
Дата:
Сообщение: Problem with FOR UPDATE
Следующее
От: Mario Splivalo
Дата:
Сообщение: Re: Postgres regexp matching failure?