X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 6746D9FA36A for ; Thu, 7 Sep 2006 06:03:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 35334-03 for ; Thu, 7 Sep 2006 06:03:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from danbo.digsys.bg (danbo.digsys.bg [192.92.129.13]) by postgresql.org (Postfix) with ESMTP id CF1039FA2F5 for ; Thu, 7 Sep 2006 06:03:41 -0300 (ADT) Received: from [193.68.6.22] (kaloyan@luke.digsys.bg [193.68.6.22]) by danbo.digsys.bg (8.11.6/8.10.1) with ESMTP id k8793ap21860; Thu, 7 Sep 2006 12:03:36 +0300 (EEST) Message-ID: <44FFE05C.2010109@faith.digsys.bg> Date: Thu, 07 Sep 2006 12:03:24 +0300 From: Kaloyan Iliev User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060117 X-Accept-Language: bg, en, en-us MIME-Version: 1.0 To: Judith , pgsql-sql@postgresql.org Subject: Re: Substitute a Character References: <44FEFCFA.8010501@correolux.com.mx> In-Reply-To: <44FEFCFA.8010501@correolux.com.mx> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.062 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200609/45 X-Sequence-Number: 26256 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 > >