X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 58354DB97D for ; Thu, 17 Nov 2005 19:47:43 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 84970-02 for ; Thu, 17 Nov 2005 23:47:45 +0000 (GMT) X-Greylist: delayed 00:56:33.201702 by SQLgrey- Received: from priv-edtnes28.telusplanet.net (outbound04.telus.net [199.185.220.223]) by svr1.postgresql.org (Postfix) with ESMTP id 47711DB96C for ; Thu, 17 Nov 2005 19:47:40 -0400 (AST) Received: from [192.168.0.16] (really [207.6.233.91]) by priv-edtnes28.telusplanet.net (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20051117234742.QORW19829.priv-edtnes28.telusplanet.net@[192.168.0.16]> for ; Thu, 17 Nov 2005 16:47:42 -0700 Mime-Version: 1.0 (Apple Message framework v623) In-Reply-To: <1132269492.30942.20.camel@dev11dt.corp.localmatters.com> References: <1132269492.30942.20.camel@dev11dt.corp.localmatters.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <5d001d303f001ea0847254c3f0a352d9@squeegeemedia.com> Content-Transfer-Encoding: 7bit From: Dawn Buie Subject: how to do a find and replace Date: Thu, 17 Nov 2005 15:47:41 -0800 To: pgsql-sql@postgresql.org X-Mailer: Apple Mail (2.623) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/138 X-Sequence-Number: 23389 Hello- I'm using postgres 7.4 I have a column of data with the wrong prefix for many items. The wrong entries are entered ' /0/v.myimage.jpg' While the correct ones are ' /0/myimage.jpg' I need to remove all the 'v.' characters from this column. I'm able to do a SELECT * FROM myTable WHERE location = '%/0/v.%' I'm just confused about how I should write code to update the selected items to remove the 'v.' Would I use substring? An example would be much appreciated. thank you Dawn