how to do a find and replace

From: Dawn Buie <dawn(at)squeegeemedia(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: how to do a find and replace
Date: 2005-11-17 22:51:05
Message-ID: c051e0b633ba9015ecd98f6c038783e0@squeegeemedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Brian Doyle 2005-11-17 23:00:59
Previous Message Michael Fuhr 2005-11-17 22:30:44 Re: Geographic Distance Calc website