If the variations are known, you should be able to use two (or more) nested replaces to get it to your desired format - for example like shown below-- see if the path exists and what the fixed up path would beSELECT dirpath, replace(replace(dirpath,'/','\'),'\\','\') FROM theTable;-- replace with the new pathdeclare @newPath varchar(255)='D:\Dir1';declare @oldPath varchar(255)='C:\Dir1';UPDATE theTable SET dirpath = @newPathwhere replace(replace(dirpath,'/','\'),'\\','\') = @oldPath ;