Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
remove noise from text strings using TRANSLATE
--
-- 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
You can’t perform that action at this time.