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 F22CDDB9DD for ; Thu, 17 Nov 2005 19:52:15 -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 84746-06 for ; Thu, 17 Nov 2005 23:52:18 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from priv-edtnes16.telusplanet.net (outbound04.telus.net [199.185.220.223]) by svr1.postgresql.org (Postfix) with ESMTP id D620ADB9CD for ; Thu, 17 Nov 2005 19:52:12 -0400 (AST) Received: from [192.168.0.16] (really [207.6.233.91]) by priv-edtnes57.telusplanet.net (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20051117225106.WOJS14467.priv-edtnes57.telusplanet.net@[192.168.0.16]> for ; Thu, 17 Nov 2005 15:51:06 -0700 Mime-Version: 1.0 (Apple Message framework v623) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: pgsql-sql@postgresql.org From: Dawn Buie Subject: how to do a find and replace Date: Thu, 17 Nov 2005 14:51:05 -0800 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/139 X-Sequence-Number: 23390 Hello- 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