#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jun 2012
    Posts
    4
    Rep Power
    0

    Update with replace query help


    Hello,

    I have a load of hyperlinks in a table that point to documents on our server.

    we have 2 domains at work so i need to ammend the prefix of the hyperlinks from...
    \\server
    to
    \\server.srl.local

    I have written the following update query..

    Code:
    Update "Document Table"
    Set PathInformation = replace(pathinformation, "SERVER" , "SERVER.srl.local"
    Where PathInformation Like "%SERVER";
    when I run the query i get the following error..

    syntax error in query. Incomplete query clause

    I can't see where I am going wrong, all the examples i can find on google show update/replace queries as i have written mine!

    If anyone can point me in the right direction I will greatly appreciate it!!

    Thanks in advance,

    Iain
  2. #2
  3. Contributing User
    ASP Adventurer (500 - 999 posts)

    Join Date
    Jun 2011
    Location
    South Jersey
    Posts
    544
    Rep Power
    58
    Code:
    Update "Document Table"
    Set PathInformation = replace(pathinformation, "SERVER" , "SERVER.srl.local")
    Where PathInformation Like "%SERVER";

Similar Threads

  1. Update tables and replace values
    By jennypretty in forum Microsoft SQL Server
    Replies: 4
    Last Post: October 1st, 2011, 06:26 AM
  2. Update query join tables and update field
    By pschneider in forum SQL Development
    Replies: 1
    Last Post: February 22nd, 2008, 12:09 PM
  3. rs.update add instead of replace
    By hah in forum ASP Development
    Replies: 2
    Last Post: March 21st, 2005, 02:27 PM
  4. Replies: 7
    Last Post: December 9th, 2004, 07:36 PM
  5. Update Query - Replace function problem
    By yaani in forum Microsoft Access Help
    Replies: 5
    Last Post: November 1st, 2004, 07:14 AM

IMN logo majestic logo threadwatch logo seochat tools logo