![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am not certain which group to post this to - sorry if this is the wrong group: I have a table that holds the location of various media and such (mostly images). One field is the Media name, the other is the URL in the form http://myServer.gunnery.org/media/pic1 for example. we are about to move all the media to a new location (new server). the paths will remain the same except for the server name. Is there an update statement that will let me go through the table an replace myServer with newServer in all the URLs (and leave the rest of the URL alone). So the link above would become http://newServer.gunnery.org/media/pic1. I know how I would do it with VB, but I am not as familar with all the tricks in SQL. thanks bj daniels danielsb (AT) gunnery (DOT) org |
#3
| |||
| |||
|
|
UPDATE table SET mediaName = REPLACE(mediaName, '//myServer', '//newServer') WHERE CHARINDEX('//myServer', mediaName) > 0 "bj daniels" <danielsb (AT) gunnery (DOT) org> wrote in message news:eNjDE50ZDHA.1620 (AT) TK2MSFTNGP12 (DOT) phx.gbl... I am not certain which group to post this to - sorry if this is the wrong group: I have a table that holds the location of various media and such (mostly images). One field is the Media name, the other is the URL in the form http://myServer.gunnery.org/media/pic1 for example. we are about to move all the media to a new location (new server). the paths will remain the same except for the server name. Is there an update statement that will let me go through the table an replace myServer with newServer in all the URLs (and leave the rest of the URL alone). So the link above would become http://newServer.gunnery.org/media/pic1. I know how I would do it with VB, but I am not as familar with all the tricks in SQL. thanks bj daniels danielsb (AT) gunnery (DOT) org |
![]() |
| Thread Tools | |
| Display Modes | |
| |