Update Query on part of a text field

Lochwood

Registered User.
Local time
Today, 13:36
Joined
Jun 7, 2017
Messages
130
Hi,

My table has a field called hyperlink which is a text field referenced to a document location.

We have now decided to move all documents to a new location so the hyperlink path will change from N:\location\foldername\filename to \\servername\location$\foldername\filename. obviously each foldername and filename is unique so i only need to change the location part of the field with an update query im thinking.

I have a new query created with Doc_Number and Hyperlink.. what would i type in the update to: part of the hyperlink column to change only the N:\location part?
 
Code:
Replace([fieldname], "N:\location\", "\\servername\location$\")
 
BTW Developers often store the static part of the path separately and concatenate it to the rest of the path and filename as required. Then only that single record needs to change when paths change.
 

Users who are viewing this thread

Back
Top Bottom