| From: | Kaloyan Iliev <news1(at)faith(dot)digsys(dot)bg> |
|---|---|
| To: | Judith <jaltamirano(at)correolux(dot)com(dot)mx>, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Substitute a Character |
| Date: | 2006-09-07 09:03:24 |
| Message-ID: | 44FFE05C.2010109@faith.digsys.bg |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mario Splivalo | 2006-09-07 10:32:15 | Re: Postgres regexp matching failure? |
| Previous Message | Kaloyan Iliev | 2006-09-07 09:00:22 | Problem with FOR UPDATE |