Last active
August 29, 2015 14:20
-
-
Save clintmjohnson/cb24aecdad43a38428ec to your computer and use it in GitHub Desktop.
This SQL Query converts a Phone Number Like this '1234567891' into this '123-456-7891'
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
SELECT | |
SUBSTRING([Customer Phone], 1, 3) + '-' + SUBSTRING([Customer Phone], 4, 3) + '-' +SUBSTRING([Customer Phone], 7, 4) | |
FROM tablename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment