• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 253
  • Last Modified:

Another T-SQL challenge

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
0
vinny45
Asked:
vinny45
  • 2
1 Solution
 
rafranciscoCommented:
UPDATE YourTable
SET YourColumn = REPLACE(YourColumn, 'C://', 'E://')
0
 
rafranciscoCommented:
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
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now