I am looking for an example of an SQL Query for MS SQL Server which woudl allow me to replace a part of the string inside the record's field.
Select * where ItemName LIKE 'O:\location1\%'
The full location example is O:\Location1\filename42a62bcf.dbs
Since the location of the files have been changed I need to preserve the rest of the record but update only "ItemName" field 'O:\location1' with "D:\Location2"
Does anyone have an example please?
Here is a basic version. Let me know if you need more
SELECT 'O:\Location1\filename42a62bcf.dbs' AS ItemFile INTO #tmp
SELECT * FROM #tmp
SET ItemFile = REPLACE(ItemFile,'O:\Location1\','D:\Location2\')
More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.
This article will describe one method to parse a delimited string into a table of data.
Why would I do that you ask? Let's say that you need to pass multiple parameters into a stored procedure to search for. For our sake, we'll say that we wa…
I've encountered valid database schemas that do not have a primary key. For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis. However, occasionally due to user error or a scheduled task…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…