I have the following rows:
Name Url
name1 http://foo.com/this/that
name6 http://that.net/hello
name2 http://foo.com/hello/world
name3 http://foo.com/world/hello
name4 http://hello.com/this/that
I need to write a query that will change every foo.com to hello.com.
Any ideas?
Take a look at the REPLACE() function: http://msdn.microsoft.com/en-us/library/ms186862.aspx. You should be able to use that in an UPDATE statement to achieve the desired result.