Using Replace to ..well...replace...

  • I have a field in a table which has hard coded paths for files. Like "http://www..../downloads/files/dlr-tlk-apr-2001.pdf"

    I need to update all references to "downloads' and change it to "forms" so all of the paths would look like:

    "http://www......./forms/files/dlr-tlk-apr-2001.pdf"

    I assume I need to use Replace. What would be the best way of doing this?

  • Without more information, you could test this.

    UPDATE MyTable SET

    file_path = REPLACE( file_path, '/Downloads/', '/forms/')

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Thanks! That's actually what I was going to try but I thought I'd have to end up using it in conjunction with InString or FindSting or something similar.....

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply