Click to See Complete Forum and Search --> : Replacing a records value


scouse
07-14-2006, 07:32 AM
Hi,

I've got an SQL database that has a column name called PRODUCT_IMAGE. Each record currently has a value such as:

http://firstdomain.co.uk/images/imagefile.gif

and I need to replace the value for each record with

http://newdomain.co.uk/images/imagefile.gif

I know I could do this manaully using enterprise manager, but there are over 1000 entries in the database and it would take ages to do each record one by one.

Is there anyway using enterpise manager to create a query that would replace all the PRODUCT_IMAGE values for all the records in one go?

Cheers

russell
07-14-2006, 08:24 AM
UPDATE myTable
SET PRODUCT_IMAGE = Replace(PRODUCT_IMAGE, 'firstdomain', 'newdomain')