Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id BD12B650E7A for ; Wed, 2 Jul 2008 14:35:51 -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 21644-09 for ; Wed, 2 Jul 2008 14:35:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from eciweb.eldocomp.com (eciweb.eldocomp.com [205.159.99.28]) by postgresql.org (Postfix) with ESMTP id 2003C64FE0F for ; Wed, 2 Jul 2008 14:35:45 -0300 (ADT) Received: from ecimail.eldocomp.com [172.20.128.2] by eciweb.eldocomp.com with XWall v3.42 ; Wed, 2 Jul 2008 10:35:33 -0700 Received: from [172.20.131.10] ([172.20.131.10]) by ecimail.eldocomp.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 2 Jul 2008 10:35:32 -0700 References: <486A9A5E.9070905@mhs.mphasis.com> <486A59E1.EE98.0025.0@wicourts.gov> <09BDF9F0EAD32745A823E1865E6C45F3C99AE3@ecimail.eldocomp.com> In-Reply-To: <09BDF9F0EAD32745A823E1865E6C45F3C99AE3@ecimail.eldocomp.com> From: Naomi Walker To: "pgsql-admin@postgresql.org" Subject: Re: Change a character in a text field Date: Wed, 2 Jul 2008 10:35:32 -0700 X-Assembled-By: XWall v3.42 Message-ID: <486BBC64.10309@mhs.mphasis.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_NextPart_1_012zf9veWJBcnxsnlaAwMFNwRSy" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.376 tagged_above=0 required=5 tests=AWL=-0.443, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=1.819 X-Spam-Level: * X-Archive-Number: 200807/33 X-Sequence-Number: 29643 This is a multi part MIME message. --_NextPart_1_012zf9veWJBcnxsnlaAwMFNwRSy Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > 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 > > =20 >>>> Naomi Walker wrote:=20 >>>> =20 >> Is there some way with a SQL state to interrogate a text field, and=20 >> replace characters. >> >> For example, we would like all "|"'s to be changed to something else, >> =20 > on=20 > =20 >> a regular basis... >> =20 > =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 --=20 ------------------------------------------------------------------------ Naomi Walker Chief Information Officer Eldorado Computing, Inc nwalker@eldocomp.com =20 ---An EDS Company 602-604-3100 ------------------------------------------------------------------------ The more I want to get something done, the less I call it work. =20 - Richard Bach ------------------------------------------------------------------------ -- CONFIDENTIALITY NOTICE -- Information transmitted by this=C2=A0e-mail is proprietary to MphasiS and/or= its Customers and is intended for use only by the individual or entity to w= hich it is addressed, and may contain information that is=C2=A0privileged, c= onfidential or exempt from disclosure under applicable law. If you are not t= he intended recipient or it appears that this e-mail has been forwarded to y= ou without proper authority, you are notified that any use or dissemination = of this information in any manner is strictly prohibited. In such cases, ple= ase notify us immediately at mailmaster@mphasis.com and delete this mail fro= m your records. --_NextPart_1_012zf9veWJBcnxsnlaAwMFNwRSy Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =20
=20
Can you please provide a complete example of how to use t=
his 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 Gri=
ttner
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

=20 
=20
=20
=20
=20
Naomi Walker <nwalker@mhs.mphasis.com> wro=
te:=20
=20       
=20
=20
=20
Is there some way with a SQL state to interrogate a tex=
t field, and=20
replace characters.

For example, we would like all "|"'s to be changed to something else,
=20   
=20
=20
on=20
=20 
=20
=20
a regular basis...
=20   
=20
=20
=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 


--=20
------------------------------------------------------------------------
Naomi Walker                          Chief Information Officer
Eldorado Computing, Inc               nwalker@eldocomp.com
=20 ---An EDS Company                   602-604-3100
------------------------------------------------------------------------
The more I want to get something done, the less I call it work.
=20  - Richard Bach
------------------------------------------------------------------------











-- CONFIDENTIALITY NOTICE --







-- CONFIDENTIALITY NOTICE --

Info= rmation transmitted by this=A0e-mail is proprietary to MphasiS and/ or its Customers and is inte= nded for use only by the individual or entity to which it is addressed, and may contain inform= ation that is privileged, confidential or exempt from disclosure under applicable law. If = you are not the intended recipient or it appears that this mail has been forwarded to you wi= thout proper authority, you are notified that any use or dissemination of this informatio= n in any manner is strictly prohibited. In such cases, please notify us immediately at mailm= aster@mphasis.com and delete this e-mail from your records.

 

--_NextPart_1_012zf9veWJBcnxsnlaAwMFNwRSy--