only logoonly logoonly logoonly logo
  • Home
  • Q&A
  • Why us?
  • Offer & pricing
  • Contact
  • Buy now
+34 459 596 302
✕

Update first 2 characters in SQL

  • Home
  • Knowledge Base
  • Software
  • Update first 2 characters in SQL
How to Manually Restore a WordPress Website From a Backup
February 28, 2022
How to Find a User’s Security Identifier (SID) in Windows
February 28, 2022
Published by cornelcaba on February 28, 2022
Categories
  • Software
Tags
  • function
  • sql
  • update
DECLARE @ReplaceString CHAR(2)
SET @ReplaceString = 'C:'
UPDATE [DATABASENAME].[dbo].[TABLENAME] SET TABLENAME= REPLACE(TABLENAME, LEFT(TABLENAME, 2),@ReplaceString)
WHERE LEFT(TABLENAME,2) = 'P:' 
Share
0
cornelcaba
cornelcaba

Related posts

August 11, 2022

Shrinking VMDK Virtual Disk Size on VMWare ESXi


Read more
March 2, 2022

Start or stop Windows service from command line


Read more
March 2, 2022

How to use RemoteFx to Redirect USB Devices in Windows


Read more

Leave a Reply Cancel reply

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

Contact with us


Nullam viverra consectetuer quisque
cursus et, porttitor risus.

+61 (0) 3 8376 6284
noreply@envato.com

Localization

Envato
Level 13, 2 Elizabeth
Victoria 3000
Australia

© 2022 Betheme by Muffin group | All Rights Reserved | Powered by WordPress