Posted On March 31, 2019

SQL replace character in string

kimconnect 0 comments
blog.KimConnect.com >> Database >> SQL replace character in string
update g2_Item set g_title = replace(g_title, ‘_’, ‘ ‘);
update g2_Item set g_title = replace(g_title, ‘-‘, ‘ ‘);
update g2_Item set g_title = replace(g_title, ‘.jpg’, ”);
update g2_Item set g_title = replace(g_title, ‘.JPG’, ”);
 
update _vldmembers set username = replace(username, ‘:’, ”);

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Microsoft Dynamics 365: System Administrator Profile Corruption Problem

Symptoms: Field Security Profile Does Not List Enabled Custom Fields Certain forms would show a…

PowerShell: Detect Microsoft SQL Version and Installed Location

function getSqlInfo{ $results=@() $instances=(get-itemproperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server').InstalledInstances foreach ($i in $instances){ $p=(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance…

PowerShell: Graceful Shutdown of MS SQL Server

import-module sqlps CD SQLSERVER:\SQL\$env:computername $sql = (get-item .).ManagedComputer # This command stops MSSQL$instanceName, SQLSERVERAGENT, SQLAGENT$instanceName,…