Please turn JavaScript on
SQLTeam.com Forums - Latest posts icon

SQLTeam.com Forums - Latest posts

Want to know the latest news and articles posted on SQLTeam.com Forums - Latest posts?

Then subscribe to their feed now! You can receive their updates by email, via mobile or on your personal news page on this website.

See what they recently published below.

Website title: SQLTeam.com Forums

Is this your feed? Claim it!

Publisher:  Unclaimed!
Message frequency:  0.58 / day

Message History

If the filename column stores the full path as text, you can update the drive letter with REPLACE() instead of changing each row manually. For example: UPDATE dbo.videofiles SET filename = REPLACE(filename, 'Z:\video\', 'X:\video\') WHERE filename LIKE 'Z:\video\%'; I would run a SELECT with the same REPLACE() first to preview the affected rows, and make a backup before runni...


Read full story

If you need to update file paths in a table, you can safely use REPLACE() to transform the old drive prefix into the new one. Be cautious when running UPDATE statements in a production environment—always validate the result first and ensure proper backups.

DECLARE @Filepath VARCHAR(256); SET @Filepath = 'Z:\video\filename.mp4'; SELECT @Filepath AS Filepath_old, REPLACE(@...

Read full story

I am moving video from an old array to a new one. The sql table (dbo.videofiles) for the video has a column simply called filename. It shows the file path to each file which is currently Z:\video\filename. I want to point the file path to X:\video\filename but, sql doesn't like the Z: or X:. without manually going through hundreds of thousands of rows, how do I tell sql to ch...


Read full story
Read full story
Read full story