Created
May 10, 2021 16:49
-
-
Save williamluisan/888e834a6a767ce80a7e98e5757198a1 to your computer and use it in GitHub Desktop.
An example of replacing chars at the left of SQL string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPLACE('62', SUBSTR(service_number, 1, 2), CONCAT('0', SUBSTR(service_number, 3, 9999))) | |
# Result: | |
## From '6282190872222' to '082190872222' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment