[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

Update Column Data in Table

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.
0
Contemporary_Cybernetics
Asked:
Contemporary_Cybernetics
  • 2
1 Solution
 
RiteshShahCommented:
will this work?

update tablename set replace(yourfiledname,'|\\server\folder1\folder2\folder3\document','|\\differentserver\folder1\folder2')
where server1='condition'
0
 
RiteshShahCommented:
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'
0
 
Contemporary_CyberneticsAuthor Commented:
Yep, I actually figured that out about 2 minutes ago. Thanks for the help, though.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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