Created
June 15, 2019 05:54
-
-
Save forstie/58f0b78538197c3b6f95d5be8ab97aac to your computer and use it in GitHub Desktop.
remove noise from text strings using TRANSLATE
This file contains hidden or 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
-- | |
-- Lets say I have this character data, how do I extract the numeric? | |
-- | |
-- Q: Library . . . . . . : SYSIBM Number of objects . : 65 | |
-- A: Use the TRANSLATE built-in function to convert all the noise characters to blanks | |
values bigint( | |
translate( | |
'Library . . . . . . : SYSIBM Number of objects . : 65', | |
' ', | |
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.:')); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment