Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save williamluisan/888e834a6a767ce80a7e98e5757198a1 to your computer and use it in GitHub Desktop.
Save williamluisan/888e834a6a767ce80a7e98e5757198a1 to your computer and use it in GitHub Desktop.
An example of replacing chars at the left of SQL string
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