Update part of a column

Last Post 05 Dec 2008 03:21 AM by SwePeso. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
phsatech
New Member
New Member

--
04 Dec 2008 06:38 PM
I have a need to update part of a column that has a production UNC path to a specific directory file and need to replace it to a test directory path instead

Table Template_Dir has Column (Template_Path) with "\\SERVER1\Reports\%inc\%report\" value
I need to just replace \\SERVER1\Reports with "\\NEWSERVER\Reports\%inc\%report\" on any occurence that has \\SERVER1\Reports in the Template_Path Column

I figured its like UPDATE Template_Dir SET Template_Path = '\\NEWSERVER\Reports\???' WHERE Dept = 'HR'

I need to maintain the current UNC path after \\NEWSERVER\Reports\ (\%inc\%report) and just change \\SERVER1\Reports\ part of the whole UNC path


Appreciate help on this newbie update.
SwePeso
New Member
New Member

--
05 Dec 2008 03:21 AM
UPDATE Template_Dir
SET Template_Path = REPLACE(Template_Path, '\\SERVER1\', '\\NEWSERVER\')
You are not authorized to post a reply.

Acceptable Use Policy