Another T-SQL challenge

Posted on 2005-05-12
Last Modified: 2010-03-19
well maybe not.

i have many records in a table that start with: 'C://folderfile'

how do i switch it to: 'e://folderfile' without using a cursor if possible
Question by:vinny45
    LVL 28

    Accepted Solution

    UPDATE YourTable
    SET YourColumn = REPLACE(YourColumn, 'C://', 'E://')
    LVL 28

    Expert Comment

    If you don't want to update the table but just change it during a select:

    SELECT REPLACE(YourColumn, 'C://', 'E://') AS YourColumn
    FROM YourTable

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    In this article—a derivative of my blog post (—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
    Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
    Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    755 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

    17 Experts available now in Live!

    Get 1:1 Help Now