Last active
August 29, 2015 14:11
-
-
Save osya/2271b319f6df764a66bd to your computer and use it in GitHub Desktop.
Replace white spaces with empty characters #SQL
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
--Tab, line feed and carriage return control characters have the values CHAR(9), CHAR(10) and CHAR(13) respectively. | |
cast(REPLACE(REPLACE(REPLACE(your_number_column,CHAR(9),”), CHAR(10),”),CHAR(13),”) as bigint) | |
http://bisherryli.com/2014/05/30/sql-54casting-numbers-with-white-spaces-as-integer-will-fail/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment