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

SQL: Creating a Storage Report of Databases Residing within Server

Method 1: -- Get sizes of all databases from system (not real-time) WITH fs AS…

Use PowerShell to Grant SysAdmin Role to Certain Users

$principle=$env:USERDOMAIN+'\Domain Admins' $sqlServer=$env:computername function includeSqlTools{ $ErrorActionPreference='stop' try{ $trustedPsgallery=(Get-PSRepository PSGallery).InstallationPolicy -eq 'Trusted' if(!$trustedPsgallery){ Set-PSRepository -Name PSGallery…

Microsoft SQL AlwaysOn Unabridged Notes

Following is a brain dump of the trials and errors in troubleshooting MS-SQL AlwaysOn High…