Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9690364FD68 for ; Tue, 1 Jul 2008 20:15:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26983-02 for ; Tue, 1 Jul 2008 20:15:45 -0300 (ADT) X-Greylist: delayed 00:15:12.611969 by SQLgrey-1.7.6 Received: from eciweb.eldocomp.com (eciweb.eldocomp.com [205.159.99.28]) by postgresql.org (Postfix) with ESMTP id 235B564FD64 for ; Tue, 1 Jul 2008 20:15:48 -0300 (ADT) Received: from ecimail.eldocomp.com [172.20.128.2] by eciweb.eldocomp.com with XWall v3.42 ; Tue, 1 Jul 2008 16:00:16 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message In-Reply-To: <486A59E1.EE98.0025.0@wicourts.gov> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] Change a character in a text field Thread-Index: AcjbwOBhhIveySMDSBKBry680YEoLwADQ02w References: <486A9A5E.9070905@mhs.mphasis.com> <486A59E1.EE98.0025.0@wicourts.gov> From: Karen Stone To: Kevin Grittner , Naomi Walker , "pgsql-admin@postgresql.org" Subject: Re: Change a character in a text field Date: Tue, 1 Jul 2008 16:00:15 -0700 X-Assembled-By: XWall v3.42 Message-ID: <09BDF9F0EAD32745A823E1865E6C45F3C99AE3@ecimail.eldocomp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.819 tagged_above=0 required=5 tests=AWL=0.000, MIME_QP_LONG_LINE=1.819 X-Spam-Level: * X-Archive-Number: 200807/23 X-Sequence-Number: 29633 Can you please provide a complete example of how to use this in the update command? ie... how do we select the table/field that we want to interrogate and make the change to? Thanks! Karen Stone Technical Services MphasiS Health Solutions 602.604.3100 x265 -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Kevin Grittner Sent: Tuesday, July 01, 2008 2:23 PM To: Naomi Walker; pgsql-admin@postgresql.org Subject: Re: [ADMIN] Change a character in a text field >>> Naomi Walker wrote:=20 > Is there some way with a SQL state to interrogate a text field, and=20 > replace characters. >=20 > For example, we would like all "|"'s to be changed to something else, on=20 > a regular basis... =20 It sounds like you might want to look at the regexp_replace function: =20 http://www.postgresql.org/docs/8.3/interactive/functions-matching.html#F UNCTIONS-POSIX-REGEXP =20 Be sure to use a WHERE clause on your UPDATE with the ~ operator. =20 -Kevin --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin -- CONFIDENTIALITY NOTICE -- Information transmitted by this??e-mail is proprietary to MphasiS and/or its= Customers and is intended for use only by the individual or entity to which= it is addressed, and may contain information that is??privileged, confident= ial or exempt from disclosure under applicable law. If you are not the inten= ded recipient or it appears that this e-mail has been forwarded to you witho= ut proper authority, you are notified that any use or dissemination of this = information in any manner is strictly prohibited. In such cases, please noti= fy us immediately at mailmaster@mphasis.com and delete this mail from your r= ecords.