Update Column Data in Table

Posted on 2009-04-24
Last Modified: 2012-05-06
Hello everyone.

I have a table with four columns. One of these columns contains data about specific locations of items, which I need to change. I'd like to update the table, replacing all instances of the server share location with a different one.

I need to select "|\\server\folder1\folder2\folder3\document" and replace it with "|\\differentserver\folder1\folder2" etc.
    LVL 31

    Accepted Solution

    will this work?

    update tablename set replace(yourfiledname,'|\\server\folder1\folder2\folder3\document','|\\differentserver\folder1\folder2')
    where server1='condition'
    LVL 31

    Expert Comment

    you can check value by selecting it before executing update statement.

    select replace(yourfiledname,'|\\server\folder1\folder2\folder3\document','|\\differentserver\folder1\folder2')
    from tablename where server1='condition'

    Author Closing Comment

    Yep, I actually figured that out about 2 minutes ago. Thanks for the help, though.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
    In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now